source: node_modules/yaml/dist/schema/common/seq.js

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

Initial commit

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