node_modules: upgrade

This commit is contained in:
Dawid Dziurla
2024-01-17 10:08:10 +01:00
parent 9ff0bc8d99
commit 00765f79cf
320 changed files with 31840 additions and 1039 deletions

View File

@@ -3,7 +3,7 @@
var createNode = require('../doc/createNode.js');
var stringifyPair = require('../stringify/stringifyPair.js');
var addPairToJSMap = require('./addPairToJSMap.js');
var Node = require('./Node.js');
var identity = require('./identity.js');
function createPair(key, value, ctx) {
const k = createNode.createNode(key, undefined, ctx);
@@ -12,15 +12,15 @@ function createPair(key, value, ctx) {
}
class Pair {
constructor(key, value = null) {
Object.defineProperty(this, Node.NODE_TYPE, { value: Node.PAIR });
Object.defineProperty(this, identity.NODE_TYPE, { value: identity.PAIR });
this.key = key;
this.value = value;
}
clone(schema) {
let { key, value } = this;
if (Node.isNode(key))
if (identity.isNode(key))
key = key.clone(schema);
if (Node.isNode(value))
if (identity.isNode(value))
value = value.clone(schema);
return new Pair(key, value);
}