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 |
|
---|
3 | var identity = require('../../nodes/identity.js');
|
---|
4 | var YAMLMap = require('../../nodes/YAMLMap.js');
|
---|
5 |
|
---|
6 | const 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 |
|
---|
19 | exports.map = map;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.