Initial import with skill sheet working

This commit is contained in:
2024-12-04 00:11:23 +01:00
commit 9050c80ab4
4488 changed files with 671048 additions and 0 deletions

26
node_modules/level-supports/test/cloneable.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
'use strict'
const { supports } = require('..')
// Every object in a manifest must have a unique identity, to avoid accidental
// mutation. In supports() we only shallowly clone the manifest object itself
// and additionalMethods. If in the future we add more objects to manifests,
// this test will break and we'll know to start performing a deep clone.
module.exports = function cloneable (t, manifest) {
const copy = supports(manifest)
verifyUnique(t, 'manifest', manifest, copy)
}
function verifyUnique (t, path, a, b) {
if (isObject(a) && isObject(b)) {
t.ok(a !== b, path + ' has unique identity')
Object.keys(a).forEach(function (key) {
verifyUnique(t, path + '.' + key, a[key], b[key])
})
}
}
function isObject (o) {
return typeof o === 'object' && o !== null
}