{"name":"yaml","version":"2.0.0-3","keywords":["YAML","parser","stringifier"],"author":{"name":"Eemeli Aro","email":"eemeli@gmail.com"},"license":"ISC","_id":"yaml@2.0.0-3","maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"}],"homepage":"https://eemeli.org/yaml/","bugs":{"url":"https://github.com/eemeli/yaml/issues"},"dist":{"shasum":"dc126f2fac9b845ee696ccbd13c8d303e247c471","tarball":"http://registry-npm.ywwl.com/yaml/download/yaml-2.0.0-3.tgz","fileCount":157,"integrity":"sha512-gvtVaY+/mQ0OsXgaWy2Tf830JuXN7qEUYdXWsuiJVSkMRsBBQ90YVpQQofaURbhoA1xSbLBf7965oH6ddzNbBQ==","signatures":[{"sig":"MEUCIHALNwvLO0vvN/h73BsmJZvUAMbI9smfvDLMEWEgHkzDAiEA01mOr/pCTDqlpQHVqGC/m306NZrbyakM4pe3u4NH0y0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":442339,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFyEJCRA9TVsSAnZWagAATZkQAJPKZInEWTm84NSOQhSe\nq8Mu7KJ+0ZiTwdaIto+rt4xrirh+iE3wXsoxyeXVD1bsLHI6779/55G4GAeb\n2Ym3aAulJlk2ONwZYQOQTm9itCn8+Fa60K2Z1rw1GRIVP2xMJ/om4UxbtNGl\ntibbIaP9rT8imylgCpTUSlpGFHHj5sUv+jv1S0jHNQqcv7gE5zYomiDmvyMu\nuUb6M6xCnKNBtjSHagM2/dZpd04emY2lGrH84/wLI/II7wy8gTeXyJdgmNrR\n3SHKi70paQDUPpBQ3+MWewXY10Q7fd/vk7mRgEQWbMzqBnMpGArL/a8c/kps\nD4wCkuwmStTIGaupPc0Ifm9ndYrP9m2NLm2O53dJfISP8VzCDpuSOCVM0Kqo\npyXHgABSfey+GSlpXNQXXnx5kDtRZuzkEU04+l3Zf1eIO3kwgLFywRgAWDKM\nEYyHf8mYX6KLZ7IUbjsrAPD2X6w8EsiK4xxmauwG6pAK5/uq+NKGbEwhEavn\nakXHeyXajfTKfU8UanwrfO2SfpqNMU3vfHhVBJFw5+4W4ifHEXcxk64nZgio\ngQVbwa4Ngglqphes6bYiwIGsiLD/DpCz3XYc2xHu8EuRQmG4ZPAL96q8Fap+\nSoxZdllOzkAENiYuNnsEneLmHGb8/bVokD1kKD5uXXrN2aA2/wfzhhkMB3i9\no93d\r\n=qI47\r\n-----END PGP SIGNATURE-----\r\n","size":76701,"noattachment":false,"key":"/yaml/-/yaml-2.0.0-3.tgz"},"main":"./index.js","type":"commonjs","readme":"# YAML <a href=\"https://www.npmjs.com/package/yaml\"><img align=\"right\" src=\"https://badge.fury.io/js/yaml.svg\" title=\"npm package\" /></a>\n\n`yaml` is a JavaScript parser and stringifier for [YAML](http://yaml.org/), a human friendly data serialization standard. It supports both parsing and stringifying data using all versions of YAML, along with all common data schemas. As a particularly distinguishing feature, `yaml` fully supports reading and writing comments and blank lines in YAML documents.\n\nThe library is released under the ISC open source license, and the code is [available on GitHub](https://github.com/eemeli/yaml/).\nIt has no external dependencies and runs on Node.js as well as modern browsers.\n\nFor the purposes of versioning, any changes that break any of the endpoints or APIs documented here will be considered semver-major breaking changes. Undocumented library internals may change between minor versions, and previous APIs may be deprecated (but not removed).\n\nFor more information, see the project's documentation site: [**eemeli.org/yaml**](https://eemeli.org/yaml/)\n\nTo install:\n\n```sh\nnpm install yaml@next\n```\n\n**Note:** These docs are for `yaml@2`. For v1, see the [v1.10.0 tag](https://github.com/eemeli/yaml/tree/v1.10.0) for the source and [eemeli.org/yaml/v1](https://eemeli.org/yaml/v1/) for the documentation.\n\n## API Overview\n\nThe API provided by `yaml` has three layers, depending on how deep you need to go: [Parse & Stringify](https://eemeli.org/yaml/#parse-amp-stringify), [Documents](https://eemeli.org/yaml/#documents), and the [CST Parser](https://eemeli.org/yaml/#cst-parser). The first has the simplest API and \"just works\", the second gets you all the bells and whistles supported by the library along with a decent [AST](https://eemeli.org/yaml/#content-nodes), and the third is the closest to YAML source, making it fast, raw, and crude.\n\n```js\nimport YAML from 'yaml'\n// or\nconst YAML = require('yaml')\n```\n\n### Parse & Stringify\n\n- [`YAML.parse(str, reviver?, options?): value`](https://eemeli.org/yaml/#yaml-parse)\n- [`YAML.stringify(value, replacer?, options?): string`](https://eemeli.org/yaml/#yaml-stringify)\n\n### YAML Documents\n\n- [`YAML.defaultOptions`](https://eemeli.org/yaml/#options)\n- [`YAML.Document`](https://eemeli.org/yaml/#yaml-documents)\n  - [`constructor(value, replacer?, options?)`](https://eemeli.org/yaml/#creating-documents)\n  - [`defaults`](https://eemeli.org/yaml/#options)\n  - [`#createNode(value, options?): Node`](https://eemeli.org/yaml/#creating-nodes)\n  - [`#anchors`](https://eemeli.org/yaml/#working-with-anchors)\n  - [`#contents`](https://eemeli.org/yaml/#content-nodes)\n  - [`#errors`](https://eemeli.org/yaml/#errors)\n- [`YAML.parseAllDocuments(str, options?): YAML.Document[]`](https://eemeli.org/yaml/#parsing-documents)\n- [`YAML.parseDocument(str, options?): YAML.Document`](https://eemeli.org/yaml/#parsing-documents)\n- [`YAML.visit(node, visitor)`](https://eemeli.org/yaml/#modifying-nodes)\n\n```js\nimport { Pair, YAMLMap, YAMLSeq } from 'yaml/types'\n```\n\n- [`new Pair(key, value)`](https://eemeli.org/yaml/#creating-nodes)\n- [`new YAMLMap()`](https://eemeli.org/yaml/#creating-nodes)\n- [`new YAMLSeq()`](https://eemeli.org/yaml/#creating-nodes)\n\n### CST Parser\n\n- [`YAML.parseCST(str): CSTDocument[]`](https://eemeli.org/yaml/#parsecst)\n\n## YAML.parse\n\n```yaml\n# file.yml\nYAML:\n  - A human-readable data serialization language\n  - https://en.wikipedia.org/wiki/YAML\nyaml:\n  - A complete JavaScript implementation\n  - https://www.npmjs.com/package/yaml\n```\n\n```js\nimport fs from 'fs'\nimport YAML from 'yaml'\n\nYAML.parse('3.14159')\n// 3.14159\n\nYAML.parse('[ true, false, maybe, null ]\\n')\n// [ true, false, 'maybe', null ]\n\nconst file = fs.readFileSync('./file.yml', 'utf8')\nYAML.parse(file)\n// { YAML:\n//   [ 'A human-readable data serialization language',\n//     'https://en.wikipedia.org/wiki/YAML' ],\n//   yaml:\n//   [ 'A complete JavaScript implementation',\n//     'https://www.npmjs.com/package/yaml' ] }\n```\n\n## YAML.stringify\n\n```js\nimport YAML from 'yaml'\n\nYAML.stringify(3.14159)\n// '3.14159\\n'\n\nYAML.stringify([true, false, 'maybe', null])\n// `- true\n// - false\n// - maybe\n// - null\n// `\n\nYAML.stringify({ number: 3, plain: 'string', block: 'two\\nlines\\n' })\n// `number: 3\n// plain: string\n// block: |\n//   two\n//   lines\n// `\n```\n\n---\n\nBrowser testing provided by:\n\n<a href=\"https://www.browserstack.com/open-source\">\n<img width=200 src=\"https://eemeli.org/yaml/images/browserstack.svg\" />\n</a>\n","browser":{"./util.js":"./browser/dist/util.js","./index.js":"./browser/index.js","./types.js":"./browser/dist/types.js","./util.mjs":"./browser/dist/util.js","./types.mjs":"./browser/dist/types.js"},"engines":{"node":">= 10"},"exports":{".":{"node":"./index.js","default":"./browser/index.js"},"./util":{"node":{"import":"./util.mjs","require":"./util.js"},"default":"./browser/dist/util.js"},"./types":{"node":{"import":"./types.mjs","require":"./types.js"},"default":"./browser/dist/types.js"},"./package.json":"./package.json"},"gitHead":"b2b35758b45e0cfc30be7443b42adc71b40b193d","scripts":{"docs":"cd docs-slate && bundle exec middleman server","lint":"eslint src/","test":"jest","build":"npm run build:node && npm run build:browser","clean":"git clean -fdxe node_modules","start":"cross-env TRACE_LEVEL=log npm run build:node && node -i -e 'YAML=require(\".\")'","prettier":"prettier --write .","test:dist":"npm run build:node && jest","build:node":"rollup -c rollup.node-config.js","preversion":"npm test && npm run build","test:types":"tsc --lib ES2017 --noEmit tests/typings.ts","docs:deploy":"cd docs-slate && ./deploy.sh","docs:install":"cd docs-slate && bundle install","build:browser":"rollup -c rollup.browser-config.js","test:browsers":"cd playground && npm test","prepublishOnly":"npm run clean && npm test && npm run build"},"_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"prettier":{"semi":false,"arrowParens":"avoid","singleQuote":true,"trailingComma":"none"},"repository":{"url":"git+https://github.com/eemeli/yaml.git","type":"git"},"_npmVersion":"6.14.7","description":"JavaScript parser and stringifier for YAML","directories":{},"_nodeVersion":"14.7.0","browserslist":"> 0.5%, not dead, not ie 11","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.6.3","eslint":"^7.19.0","rollup":"^2.38.2","prettier":"^2.2.1","cross-env":"^7.0.3","babel-jest":"^26.6.3","fast-check":"^2.12.0","typescript":"^4.1.3","@babel/core":"^7.12.10","common-tags":"^1.8.0","babel-eslint":"^10.1.0","@babel/preset-env":"^7.12.11","babel-plugin-trace":"^1.1.0","@rollup/plugin-babel":"^5.2.3","eslint-config-prettier":"^7.2.0","@babel/plugin-proposal-class-properties":"^7.12.1","@babel/plugin-proposal-nullish-coalescing-operator":"^7.12.1"},"_npmOperationalInternal":{"tmp":"tmp/yaml_2.0.0-3_1612128520803_0.25239068729749325","host":"s3://npm-registry-packages"},"publish_time":1612128520953,"_cnpm_publish_time":1612128520953,"dist-tags":{"latest":"2.9.1","next":"3.0.0-2"}}