source: node_modules/@swagger-api/apidom-ast/es/yaml/schemas/json/Boolean.mjs

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: 437 bytes
RevLine 
[d24f17c]1import Tag from "../Tag.mjs";
2/* eslint-disable class-methods-use-this */
3class Boolean extends Tag {
4 static uri = 'tag:yaml.org,2002:bool';
5 test(node) {
6 return /^(true|false)$/.test(node.content);
7 }
8 resolve(node) {
9 const content = node.content === 'true';
10 const nodeClone = node.clone();
11 nodeClone.content = content;
12 return nodeClone;
13 }
14}
15/* eslint-enable class-methods-use-this */
16
17export default Boolean;
Note: See TracBrowser for help on using the repository browser.