{"name":"yaml","version":"2.0.0-0","keywords":["YAML","parser","stringifier"],"author":{"name":"Eemeli Aro","email":"eemeli@gmail.com"},"license":"ISC","_id":"yaml@2.0.0-0","maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"}],"homepage":"https://eemeli.org/yaml/","bugs":{"url":"https://github.com/eemeli/yaml/issues"},"dist":{"shasum":"432108d836b6715fd33af2e324a8d3980e96f7fe","tarball":"http://registry-npm.ywwl.com/yaml/download/yaml-2.0.0-0.tgz","fileCount":35,"integrity":"sha512-+n+AwzE2hK2j21p36UB2foND6RYQU4PQkdPCK4YF2OKz8BbiNI+NvKS79CpyDChw3k/0L9jnChkjEzKoiu2C7w==","signatures":[{"sig":"MEYCIQCGylWqhRqrvjkJYTPbP7AcFTQCYY6p8XD84YiDVabcagIhAI9BPO/pEIkw2KwCXu0Pe3yG2B4/ENfug7OeI6e1FR33","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":440813,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQoT4CRA9TVsSAnZWagAAbM8P/2pI0z90wqOucRD7FAN0\nfV9FdPuWpdXuBUnG5S5shLRzBYQ2zg4lSTsZQ6JDEEZYtCx7vgRMWrMkoleC\n8VN44zXAejyEyHr82oVwWMLh4RnV5LxrkTZitmWc6FHQZpnBUFGk+Jo2XYC8\njjqxhjMCRbJ4ufXoQq4F8u5pllshb9CaY4T07brjzZsHBhRuukAk92fq7MuC\n+QT05SWIn+RrOV1cnRaL1/omD5za1+8cnFgxSxEub4Uf6AO+w9TpJnkolj/B\nszvNVYDoWHyUCpI7ct9E7JPErOWbtta3mz6AtGtALWCFJyHfj/6SD3cuP0c8\n9BNMF+s9sjMQYdl74piq4x/D/AO9u0hnTN08rbkIJVjB9ngHRlgeGwlAcTVf\nL+uu2SUnb/Xd1JvT7bVossMMtgolNkzBcGCzyrplT54RIbj5eU/GKexuzQ7C\n0AuKjx7N1sYD/GYzcwfEf3psHZy2eGrcN2nXbl8Qk+KoETabzcSvRM3oEE47\nojoQQIQONAWzwlywBn4YbvVMnLM8sewTkgtr9D5Gn0RmoQHnuqdwov4zc/Z0\nGb2QQQASO6RFPKh8y91vkXcXA3BfBUrSV9RWKofmM05YdgPXqJrd+RkdUdNQ\nG4iqDHiuERINX4tM/xNsEDja6hrqJGLzqJOma6SjEp1BP3uWchsnEizRM6jF\nZWha\r\n=ajaD\r\n-----END PGP SIGNATURE-----\r\n","size":93558,"noattachment":false,"key":"/yaml/-/yaml-2.0.0-0.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><a href=\"https://travis-ci.org/eemeli/yaml\"><img align=\"right\" src=\"https://travis-ci.org/eemeli/yaml.svg?branch=master\" title=\"Build status\" /></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/). It has no external dependencies and runs on Node.js 6 and later, and in browsers from IE 11 upwards.\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, options): value`](https://eemeli.org/yaml/#yaml-parse)\n- [`YAML.stringify(value, 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, 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\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```js\nimport parseCST from 'yaml/parse-cst'\n```\n\n- [`parseCST(str): CSTDocument[]`](https://eemeli.org/yaml/#parsecst)\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//\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/util.js","./index.js":"./browser/index.js","./types.js":"./browser/types.js","./util.mjs":"./browser/util.js","./types.mjs":"./browser/types.js","./parse-cst.js":"./browser/parse-cst.js"},"engines":{"node":">= 6"},"exports":{".":"./index.js","./util":[{"import":"./util.mjs"},"./util.js"],"./types":[{"import":"./types.mjs"},"./types.js"],"./parse-cst":"./parse-cst.js","./package.json":"./package.json"},"gitHead":"0a4d4cc3fd821807b652aa73454983d29b429210","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","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^26.4.2","eslint":"^7.7.0","rollup":"^2.26.5","prettier":"^2.0.5","cross-env":"^7.0.2","babel-jest":"^26.3.0","fast-check":"^2.2.0","typescript":"^4.0.2","@babel/core":"^7.11.4","common-tags":"^1.8.0","babel-eslint":"^10.1.0","@babel/preset-env":"^7.11.0","babel-plugin-trace":"^1.1.0","@rollup/plugin-babel":"^5.2.0","eslint-config-prettier":"^6.11.0","@babel/plugin-proposal-class-properties":"^7.10.4"},"_npmOperationalInternal":{"tmp":"tmp/yaml_2.0.0-0_1598194935750_0.7647945892021262","host":"s3://npm-registry-packages"},"publish_time":1598194935918,"_cnpm_publish_time":1598194935918,"dist-tags":{"latest":"2.9.1","next":"3.0.0-2"}}