{"name":"yaml","version":"1.0.0-beta.7","keywords":["YAML","parser","stringifier"],"author":{"name":"Eemeli Aro","email":"eemeli@gmail.com"},"license":"ISC","_id":"yaml@1.0.0-beta.7","maintainers":[{"name":"eemeli","email":"eemeli@gmail.com"},{"name":"jbnicolai","email":"jappelman@xebia.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"homepage":"https://github.com/eemeli/yaml#readme","bugs":{"url":"https://github.com/eemeli/yaml/issues"},"dist":{"shasum":"681937c5b2d85b6eb474d47e877f5e63a7efe20c","tarball":"http://registry-npm.ywwl.com/yaml/download/yaml-1.0.0-beta.7.tgz","fileCount":39,"integrity":"sha512-nnAWKkYkZUqP2o3D88A0tjIYpSazbv2LHYXoIVzqKOhsw18cQ9ANuNtbn055jijI8xssSbT+Z69Xb4D+Gz66pw==","signatures":[{"sig":"MEQCIHWlhdg+5pvQ9S9riHCe6bwVS2ms/j52wneSW+DgSPmdAiBicTxLkG0L+zFqMD4c8c/RXu8PcrBtn76krcbCYqFU/Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":199921,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbI8d3CRA9TVsSAnZWagAAIlIP/iWQjvMWSWRYlxYZCMI5\n4TLVs4nl0qkCgal0G3uY74Q9vmdNlAlnM0nfapVqmC013TQCmePq4Wc+yo65\nQcP5i3TWn41qGessL71jwYAyMSuRmxeIf4IzEKNU8fEri6QyIYtyAXdyCXCA\ninqU2C+jPy8kkfqO5L0iD+lMEYKoX6YZ6LB5tqtnlE20MarErPPOIFbOz6Zk\nh1C9YMKNY7nXEf8xqL8jXbvWo2Wcveh5Iyn+xMkpKttZckcz096EButF0FLC\nWaLWD7S9YgW/39EQ74LWDt4ANNrgGij1HRCKwMPvuH74ppeK8KAFSbqUDgRM\nBnBLeDDxMw0PLSqKNLn8qutoCY8tGv/G/88unxLFwWR6QpWw4HBjjfizML9k\ne39wLA7jVGytqcD6YIUb4iuIFJmDVnDhCjqYsldVMmqqY5v3pRSJd1QTsO1e\n8sDoYq2z/J4g6PPpZCYF5lNjk6AuDyy3j0FihK18f2cWDGFnKSyPjQRLinKJ\n3QL93op2JYaGPAetLgDu2tRjsqHKIk44lHw6nRsYsJ37vrhsIm/HMO5E4UtS\nJdaOR0WZbrSPyyaoAREF0EHLfiDLLVu79F59o6PMT0VYi1WEKMu9I0tpq0RE\nPz2xMC77oEEE76pDtqRkDnP1SWFtwOWqmZvr+4kuX404HA0hwO8EELXfOaIh\nfnsj\r\n=214Z\r\n-----END PGP SIGNATURE-----\r\n","size":35045,"noattachment":false,"key":"/yaml/-/yaml-1.0.0-beta.7.tgz"},"jest":{"testPathIgnorePatterns":["__tests__/common","__tests__/ast/common"]},"main":"dist/index.js","babel":{"plugins":[["trace",{"strip":true}]],"presets":["@babel/env","@babel/stage-3"]},"files":["dist/"],"readme":"# YAML\n\nJavaScript parser and stringifier for [YAML 1.2](http://yaml.org/)\n\nNote: `yaml` 0.x and 1.x are rather different implementations. For the earlier `yaml`, see [tj/js-yaml](https://github.com/tj/js-yaml).\n\n\n## Usage\n\n```\nnpm install yaml@next\n```\n\n```js\nimport YAML from 'yaml'\n\nconst yaml =\n`YAML:\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\nYAML.parse(yaml)\n/*\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\nconst docs = YAML.parseDocuments(yaml)\ndocs[0].toString() === yaml\n```\n\n\n## Beta Progress\n\nThe reason why this project exists is to have a tool that's capable of properly generating and handling YAML files with comments, specifically to provide context for translation strings that have been lifted out of JS source code. We're not there quite yet, as the prerequisite for that is having a complete and functioning YAML library.\n\n\n### What Works So Far\n\n#### Parsing\n- Support for all YAML node types, including alias nodes and multi-document streams\n- Complete support for the Fallback, JSON, and Core [Schemas], as well as an \"extended\" schema that covers all of the YAML 1.1 scalar [types] except for `!!yaml`.\n- `YAML.parse` converts string input to native JavaScript values\n- Comments are parsed and included in the outputs of `YAML.parseAST` ([lower-level AST] of the input) and `YAML.parseDocuments` (array of `Document` objects with `Map`/`Seq`/`Scalar` contents). These functions should never throw, but include arrays of `errors` and `warnings`.\n- Support for `<<` merge keys (default-disabled, enable with `merge: true` option)\n- Complete match between the parsed `in.yaml`, `in.json`, `out.yaml`, and `error` files across all of the [yaml-test-suite] test cases (note: A few of the tests are not in agreement with the spec, so this requires the use of a [custom branch] until the relevant [pull requests] and [issues] are resolved)\n- \"Native\" `Map` and `Seq` collections have `toJSON()` methods for bare JavaScript `Object` and `Array` output\n- Any string input should be accepted, and produce some output. Errors (if any) are not thrown, but included in the document's `errors` array\n\n[Schemas]: http://www.yaml.org/spec/1.2/spec.html#Schema\n[types]: http://yaml.org/type/\n[yaml-test-suite]: https://github.com/yaml/yaml-test-suite\n[custom branch]: https://github.com/eemeli/yaml-test-suite/tree/fixed-data\n[pull requests]: https://github.com/yaml/yaml-test-suite/pulls/eemeli\n[issues]: https://github.com/yaml/yaml-test-suite/issues/created_by/eemeli\n[lower-level AST]: src/ast/README.md\n\n#### Creating\n- `new YAML.Document()` does not need any arguments to create new documents, which may then have their `#contents` set to any type\n- `Document#resolveValue(value)` wraps values in `yaml` objects, deeply mapping arrays to `Seq`, objects to `Map`, and everything else to `Scalar`\n- Comments can be attached on or before any `Seq`, `Map` and `Scalar`\n\n#### Stringifying\n- `Document#toString()` produces idempotent YAML from all non-error spec examples and test suite cases\n- Comments and non-default tags are explicitly included in the output\n- String output is folded when possible to fit to a max width of 80 characters (customisable)\n- `AST#toString()` works completely, but is clumsy to use\n\n\n### Still Needs Work\n- Alias nodes are resolved too early, and can't be created\n- Need to consider handling stream input\n- Better documentation\n","gitHead":"4286bdfe98609dbf600526930359d17b96f0c1be","scripts":{"docs":"cd docs/ && bundle exec middleman server","test":"TRACE_LEVEL=log jest","build":"babel src/ --out-dir dist/","version":"git commit -am \"Update version\" && git add -f dist/","prettier":"prettier --write \"{src,__tests__}/**/*.js\"","preversion":"npm test && npm run build","test:trace":"TRACE_LEVEL=trace,log jest --no-cache","docs:deploy":"cd docs/ && ./deploy.sh","postversion":"git reset --hard HEAD^","docs:install":"cd docs/ && bundle install","prepublishOnly":"npm test && npm run build"},"_npmUser":{"name":"eemeli","email":"eemeli@gmail.com"},"prettier":{"semi":false,"singleQuote":true},"repository":{"url":"git+https://github.com/eemeli/yaml.git","type":"git"},"_npmVersion":"6.1.0","description":"JavaScript parser and stringifier for YAML 1.2","directories":{},"_nodeVersion":"10.3.0","dependencies":{},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^22.4.3","prettier":"1.12.1","@babel/cli":"^7.0.0-beta.46","babel-core":"^7.0.0-bridge.0","babel-jest":"^22.4.3","@babel/core":"^7.0.0-beta.46","@babel/preset-env":"^7.0.0-beta.46","babel-plugin-trace":"^1.1.0","@babel/preset-stage-3":"^7.0.0-beta.46"},"_npmOperationalInternal":{"tmp":"tmp/yaml_1.0.0-beta.7_1529071479501_0.20629537654386376","host":"s3://npm-registry-packages"},"publish_time":1529071479596,"_cnpm_publish_time":1529071479596,"dist-tags":{"latest":"2.9.1","next":"3.0.0-2"}}