{"_id":"yaml-ast-parser-custom-tags","_rev":"1-90903c06636e38453508633376c6b42a","name":"yaml-ast-parser-custom-tags","dist-tags":{"latest":"0.0.43"},"versions":{"0.0.43":{"name":"yaml-ast-parser-custom-tags","version":"0.0.43","main":"dist/src/index.js","scripts":{"build":"rimraf dist && tsc","pullall":"dev-env-installer pullall","buildall":"dev-env-installer buildall","testall":"dev-env-installer testall","devInstall":"dev-env-installer install","test":"npm run build && mocha --ui tdd dist/test"},"dependencies":{},"typings":"dist/src/index.d.ts","repository":{"type":"git","url":"git+https://github.com/jpinkney/yaml-ast-parser.git"},"keywords":["raml","ast","yaml"],"homepage":"https://github.com/mulesoft-labs/yaml-ast-parser","license":"Apache-2.0","bugs":{"url":"https://github.com/mulesoft-labs/yaml-ast-parser/issues"},"devDependencies":{"@types/chai":"4.0.1","@types/mocha":"2.2.41","@types/node":"4.2.20","chai":"4.0.2","dev-env-installer":"0.0.14","mocha":"3.4.2","rimraf":"*","typescript":"3.0.1"},"gitHead":"99da813585ea6985d31f1b05d5e061214b2e86c5","description":"This is a custom maintained fork specifically for the YAML Language server.","_id":"yaml-ast-parser-custom-tags@0.0.43","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"jpinkney","email":"joshpinkney@gmail.com"},"dist":{"integrity":"sha512-R5063FF/JSAN6qXCmylwjt9PcDH6M0ExEme/nJBzLspc6FJDmHHIqM7xh2WfEmsTJqClF79A9VkXjkAqmZw9SQ==","shasum":"46968145ce4e24cb03c3312057f0f141b93a7d02","tarball":"https://registry.npmjs.org/yaml-ast-parser-custom-tags/-/yaml-ast-parser-custom-tags-0.0.43.tgz","fileCount":163,"unpackedSize":407989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcf06lCRA9TVsSAnZWagAATkAP/3Fn/9TvurJPNBMFWFgO\neFYty+RDlGpUF+TacMKPViQ/YguPHVXlPwkzzq5Z92vZ6NZFGpU7xWGCDIGn\n8bzSZwc2yP3SRCbLcct3ZP8DFLBD29vRhSw/4FxYNmK0yYrjkCvtBo5td4Ki\nGPPXq5G9feosJv6a7OCvcfDGBU1frbIVwGVciaslU/a4iQnxISAY5DnTFAJN\nSjAVGBei0eeS6Wu0sA6D/bDUP7q7SBmTNog18mAHEGX5BXZij1I3ARay866M\n/WowVGnneRyZtGmZ4njqc/9eHVHtJP42QnecyRbHybUqX+vnbIz1EjKRvfUz\nHvZ9eOf6C+Tm0KtFKk1n+BJ3uRMxE09nY2DeSFjDLftyR55wkiXMg2ZtjxDh\nWd0hA8VKKcw8WqEBxX+tT+wGnQ5QRp+IEXfwBpVCNR1BObxHTv4WvLWe/cho\nuELxeoSXp7NpVzNlj5+i5wGYoN45u3bYZzGSSYzAKlpx05AbDJ9P0OwzkGLA\nJVoLI2tok1/61u6NIHGB/a5QBzxs4fvvl/K1ZBV6sQ46Kvr6z3paPf/jTC7v\n73GRmIly2z1L0CKa5XwammfGqSIDd1+iq42qvN4gKOVgBijNUTBUcDaDdMQJ\noE0NJvbB8Rs60iB41068ZRcuL1FzhKwODXPMuve/QRlfBMy/uAF3wy6H46Yi\nzVJO\r\n=ZcFc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXzq4/FhKNknVaIMMmdtnJWEUCg2HrCXbXZCc/v55/hAIhAIWQHF6ScT33KJQ/kbG/48UyHMtugihGg+eTf2NUYV2h"}]},"maintainers":[{"name":"jpinkney","email":"joshpinkney@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/yaml-ast-parser-custom-tags_0.0.43_1551847076532_0.15079142274785484"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-06T04:37:56.532Z","0.0.43":"2019-03-06T04:37:56.677Z","modified":"2022-05-25T03:20:36.065Z"},"maintainers":[{"name":"jpinkney","email":"joshpinkney@gmail.com"}],"description":"This is a custom maintained fork specifically for the YAML Language server.","homepage":"https://github.com/mulesoft-labs/yaml-ast-parser","keywords":["raml","ast","yaml"],"repository":{"type":"git","url":"git+https://github.com/jpinkney/yaml-ast-parser.git"},"bugs":{"url":"https://github.com/mulesoft-labs/yaml-ast-parser/issues"},"license":"Apache-2.0","readme":"This is a custom maintained fork specifically for the YAML Language server.\n\nThe ONLY goal of this fork is to extend the custom tags of YAML-AST-PARSER so that custom tags can have multiple types.\n\nIf you are looking for the main YAML-AST-PARSER project you can find that [here](https://github.com/mulesoft-labs/yaml-ast-parser)\n\nChanges in the project:\n    - src/loader.ts - added additionalKinds field\n    - test/multipleKinds.test.ts - added tests for additionalKinds field\n    - README.md\n\n# yaml-ast-parser\n\n[![Build Status](https://travis-ci.org/jpinkney/yaml-ast-parser.svg?branch=master)](https://travis-ci.org/jpinkney/yaml-ast-parser)\n\nThis is a fork of JS-YAML which supports parsing of YAML into AST.\n\nIn additional to parsing YAML to AST, it has following features:\n\n* restoration after the errors and reporting errors as a part of AST nodes.\n* built-in support for `!include` tag used in RAML\n\n## Usage\nThe type information below is relevant when using TypeScript, if using from JavaScript only the field/method information is relevant.\n\n`load` method can be used to load the tree and returns a `YAMLNode`.\n\n### YAMLNode\n`YAMLNode` class is an ancestor for all node kinds.\nIt's `kind` field determine node kind, one of `Kind` enum:\n  * `SCALAR`, `MAPPING`, `MAP`, `SEQ`, `ANCHOR_REF` or `INCLUDE_REF`.\n \nAfter node kind is determined, it can be cast to one of the `YAMLNode` descendants types:\n * `YAMLScalar`, `YAMLMapping`, `YamlMap`, `YAMLSequence` or `YAMLAnchorReference`.\n\n| class | important members |\n|-------|-------------------|\n| `YAMLNode` | `startPosition` and `endPosition` provide node range.|\n| `YAMLScalar` | `string` `value` field |\n| `YAMLMapping` |`YAMLScalar` `key` and `YAMLNode` `value` fields | \n| `YAMLSequence` | `YAMLNode[]` `items` field|\n| `YamlMap` | `YAMLMapping[]` `mappings` field|\n| `YAMLAnchorReference` | `string` `referencesAnchor` and `YAMLNode` `value`|\n\n### YAMLScalar\n\nScalars are [one of the three main node types defined by YAML](http://www.yaml.org/spec/1.2/spec.html#scalar//) and are effectively leaf nodes.\n\nThere are many factors that can influence the type of datum represent in scalar node (context, schema, tag, etc.).\n\nTo help inspection of a `YAMLScalar` to determine its datatype when a document uses the [Core Schema](http://www.yaml.org/spec/1.2/spec.html#id2804923), you can pass the `YAMLScalar` to the `determineScalarType` function.  It will return an enum value indicating `null`, `bool`, `int`, `float`, or `string`.\n\nOnce you know the type, there are also some helper functions to help read the value by passing them the string, `value`: `parseYamlBoolean`, `parseYamlFloat`, and `parseYamlInteger`.","readmeFilename":"README.md"}