UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

105 lines (104 loc) 4.59 kB
{ "_args": [ [ { "raw": "json2yaml@^1.1.0", "scope": null, "escapedName": "json2yaml", "name": "json2yaml", "rawSpec": "^1.1.0", "spec": ">=1.1.0 <2.0.0", "type": "range" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/pnpm-file-reporter" ] ], "_from": "json2yaml@>=1.1.0 <2.0.0", "_id": "json2yaml@1.1.0", "_inCache": true, "_location": "/json2yaml", "_nodeVersion": "4.3.2", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", "tmp": "tmp/json2yaml-1.1.0.tgz_1461041755832_0.38284349953755736" }, "_npmUser": { "name": "coolaj86", "email": "coolaj86@gmail.com" }, "_npmVersion": "2.14.12", "_phantomChildren": {}, "_requested": { "raw": "json2yaml@^1.1.0", "scope": null, "escapedName": "json2yaml", "name": "json2yaml", "rawSpec": "^1.1.0", "spec": ">=1.1.0 <2.0.0", "type": "range" }, "_requiredBy": [ "/pnpm-file-reporter" ], "_resolved": "https://registry.npmjs.org/json2yaml/-/json2yaml-1.1.0.tgz", "_shasum": "5414d907f9816586b80c513ec2e3aeb2ab819a6c", "_shrinkwrap": null, "_spec": "json2yaml@^1.1.0", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/pnpm-file-reporter", "author": { "name": "AJ ONeal", "email": "coolaj86@gmail.com", "url": "http://coolaj86.com" }, "bin": { "json2yaml": "./cli.js", "jsontoyaml": "./cli.js", "jsontoyml": "./cli.js", "json2yml": "./cli.js" }, "bugs": { "url": "https://github.com/coolaj86/json2yaml/issues" }, "dependencies": { "remedial": "1.x" }, "description": "A commandline utility to convert JSON to YAML / YML", "devDependencies": {}, "directories": {}, "dist": { "shasum": "5414d907f9816586b80c513ec2e3aeb2ab819a6c", "tarball": "https://registry.npmjs.org/json2yaml/-/json2yaml-1.1.0.tgz" }, "engines": { "node": ">= 0.2.0" }, "gitHead": "aecfdcec99eea24d62b2a551b09d6fbaa361f8e1", "homepage": "https://github.com/coolaj86/json2yaml#readme", "keywords": [ "yml", "yaml", "json", "cli", "util" ], "license": "Apache-2.0", "main": "index.js", "maintainers": [ { "name": "coolaj86", "email": "coolaj86@gmail.com" } ], "name": "json2yaml", "optionalDependencies": {}, "preferGlobal": true, "readme": "json2yaml\n===\n\nA command-line utility to convert JSON to YAML (meaning a `.json` file to a `.yml` file)\n\nThe purpose of this utility is to pretty-print JSON in the human-readable YAML object notation\n(ignore the misnomer, YAML is not a Markup Language at all).\n\nInstallation\n===\n\n```bash\nnpm install -g json2yaml\n```\n\n*Note*: To use `npm` and `json2yaml` you must have installed [NodeJS](http://nodejs.org#download).\n\nUsage\n---\n\nSpecify a file:\n\n```bash\njson2yaml ./example.json > ./example.yml\n\nyaml2json ./example.yml | json2yaml > ./example.yml\n```\n\nOr pipe from stdin:\n\n```bash\ncurl -s http://foobar3000.com/echo/echo.json | json2yaml\n\nwget -qO- http://foobar3000.com/echo/echo.json | json2yaml\n```\n\nOr require:\n\n```javascript\n(function () {\n \"use strict\";\n\n var YAML = require('json2yaml')\n , ymlText\n ;\n\n ymlText = YAML.stringify({\n \"foo\": \"bar\"\n , \"baz\": \"corge\"\n });\n\n console.log(ymlText);\n}());\n```\n\nExample\n===\n\nSo, for all the times you want to turn JSON int YAML (YML):\n\n```javascript\n{ \"foo\": \"bar\"\n, \"baz\": [\n \"qux\"\n , \"quxx\"\n ]\n, \"corge\": null\n, \"grault\": 1\n, \"garply\": true\n, \"waldo\": \"false\"\n, \"fred\": \"undefined\"\n}\n```\n\nbecomes\n\n```yaml\n---\n foo: \"bar\"\n baz:\n - \"qux\"\n - \"quxx\"\n corge: null\n grault: 1\n garply: true\n waldo: \"false\"\n fred: \"undefined\"\n```\n\n*Note*: In fact, both of those Object Notations qualify as YAML\nbecause JSON technically *is* a proper subset of YAML.\nThat is to say that all proper YAML parsers parse proper JSON.\n\nYAML can use either *whitespace and dashes* or *brackets and commas*.\n\nFor human readability, the whitespace-based YAML is preferrable.\nFor compression and computer readability, the JSON syntax of YAML is preferrable.\n\nAlias\n===\n\n`json2yaml` has the following aliases:\n\n * `jsontoyaml`\n * `json2yml`\n * `jsontoyml`\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/coolaj86/json2yaml.git" }, "scripts": {}, "test": "echo 'error no test'; exit 1", "version": "1.1.0" }