source: node_modules/yaml/dist/schema/common/null.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: 469 bytes
Line 
1'use strict';
2
3var Scalar = require('../../nodes/Scalar.js');
4
5const nullTag = {
6 identify: value => value == null,
7 createNode: () => new Scalar.Scalar(null),
8 default: true,
9 tag: 'tag:yaml.org,2002:null',
10 test: /^(?:~|[Nn]ull|NULL)?$/,
11 resolve: () => new Scalar.Scalar(null),
12 stringify: ({ source }, ctx) => typeof source === 'string' && nullTag.test.test(source)
13 ? source
14 : ctx.options.nullStr
15};
16
17exports.nullTag = nullTag;
Note: See TracBrowser for help on using the repository browser.