From b22f6770c8bd084d66950655203c61dd701b3d90 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 4 Jun 2022 08:51:19 +0200 Subject: Remove node_modules --- .../yaml/browser/dist/schema/common/map.js | 42 ---------------------- 1 file changed, 42 deletions(-) delete mode 100644 node_modules/yaml/browser/dist/schema/common/map.js (limited to 'node_modules/yaml/browser/dist/schema/common/map.js') diff --git a/node_modules/yaml/browser/dist/schema/common/map.js b/node_modules/yaml/browser/dist/schema/common/map.js deleted file mode 100644 index 133d861..0000000 --- a/node_modules/yaml/browser/dist/schema/common/map.js +++ /dev/null @@ -1,42 +0,0 @@ -import { isMap } from '../../nodes/Node.js'; -import { createPair } from '../../nodes/Pair.js'; -import { YAMLMap } from '../../nodes/YAMLMap.js'; - -function createMap(schema, obj, ctx) { - const { keepUndefined, replacer } = ctx; - const map = new YAMLMap(schema); - const add = (key, value) => { - if (typeof replacer === 'function') - value = replacer.call(obj, key, value); - else if (Array.isArray(replacer) && !replacer.includes(key)) - return; - if (value !== undefined || keepUndefined) - map.items.push(createPair(key, value, ctx)); - }; - if (obj instanceof Map) { - for (const [key, value] of obj) - add(key, value); - } - else if (obj && typeof obj === 'object') { - for (const key of Object.keys(obj)) - add(key, obj[key]); - } - if (typeof schema.sortMapEntries === 'function') { - map.items.sort(schema.sortMapEntries); - } - return map; -} -const map = { - collection: 'map', - createNode: createMap, - default: true, - nodeClass: YAMLMap, - tag: 'tag:yaml.org,2002:map', - resolve(map, onError) { - if (!isMap(map)) - onError('Expected a mapping for this tag'); - return map; - } -}; - -export { map }; -- cgit