source: node_modules/yaml/dist/schema/common/map.js@ d24f17c

main
Last change on this file since d24f17c was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago

Initial commit

  • Property mode set to 100644
File size: 483 bytes
Line 
1'use strict';
2
3var identity = require('../../nodes/identity.js');
4var YAMLMap = require('../../nodes/YAMLMap.js');
5
6const map = {
7 collection: 'map',
8 default: true,
9 nodeClass: YAMLMap.YAMLMap,
10 tag: 'tag:yaml.org,2002:map',
11 resolve(map, onError) {
12 if (!identity.isMap(map))
13 onError('Expected a mapping for this tag');
14 return map;
15 },
16 createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)
17};
18
19exports.map = map;
Note: See TracBrowser for help on using the repository browser.