{"_id":"@alexbosworth/prettyjson","_rev":"2-e91d5f9d147a1151d1d112b06d7554e2","name":"@alexbosworth/prettyjson","dist-tags":{"latest":"1.2.2"},"versions":{"1.2.1":{"author":{"name":"Rafael de Oleza","email":"rafeca@gmail.com","url":"https://github.com/rafeca"},"name":"@alexbosworth/prettyjson","description":"Package for formatting JSON data in a coloured YAML-style, perfect for CLI output","version":"1.2.1","homepage":"http://rafeca.com/prettyjson","keywords":["json","cli","formatting","colors"],"repository":{"type":"git","url":"git+https://github.com/rafeca/prettyjson.git"},"bugs":{"url":"https://github.com/rafeca/prettyjson/issues"},"main":"./lib/prettyjson","license":"MIT","scripts":{"test":"npm run jshint && mocha --reporter spec","testwin":"node ./node_modules/mocha/bin/mocha --reporter spec","jshint":"jshint lib/*.js test/*.js","coverage":"istanbul cover _mocha --report lcovonly -- -R spec","coveralls":"npm run coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage","changelog":"git log $(git describe --tags --abbrev=0)..HEAD --pretty='* %s' --first-parent"},"bin":{"prettyjson":"bin/prettyjson"},"dependencies":{"colors":"1.1.2","minimist":"^1.2.0"},"devDependencies":{"coveralls":"^2.11.15","istanbul":"^0.4.5","jshint":"^2.9.4","mocha":"^3.1.2","mocha-lcov-reporter":"^1.2.0","should":"^11.1.1"},"gitHead":"bc6765c4d0fa1617c24e7eddf2d7c5eef0699fb7","_id":"@alexbosworth/prettyjson@1.2.1","_nodeVersion":"16.13.1","_npmVersion":"8.3.0","dist":{"integrity":"sha512-b7AoM21tb21f+ZAZfKswhQ5u+ZjjYt6Mywlp1nbXrKEmER/iIco10S4Ply9dSAon4alpHTcP1ixT/kZb7422/Q==","shasum":"7147643d0f6b074e2dcce1cabf9b4b846ee34cb1","tarball":"https://registry.npmjs.org/@alexbosworth/prettyjson/-/prettyjson-1.2.1.tgz","fileCount":17,"unpackedSize":626490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh23ZMCRA9TVsSAnZWagAA5JAP/0dGwGE5aWeWurbqqI5U\n9iczQlIIfSdUR+r8raTsgoD2Oh9Wq/H8Rr3xvBCQ+UJQHx9fwnQptZlILOL6\n8a96MeEtmRIOKlJ97p3vme2CH7uPKm5QHX6VZtcEOtOicnyFINJfz4QwhuK4\nDStiI0imcT4M1u0kmV9njT929z75CfpUVtEyd1De7ACoUdH5dcDYG9KeiCZR\nw7bXraYOZjr/gLo4OGGqRweVxTUr22Vm1h5+xaKJwqFuadE4Zeog9WG6XWdn\nbycoL5dfkW8T6x4R6/571O/PtINCMgacj8UVlr91jsnksl9gwDODsKSALjP/\n5bO8APMVKnRLYE15Qh0bt6/Y5F/BkBqeSpFoV60hIM2IfTXk9ezlfOJ34ZWh\nri8EdkZsIqjeIKYbgpxaSanwZjAo9/JRlAFJyHPlev2J8jPg0yBjmly0XXxi\n7n3DLIeaaiQTLVDtH/iD8O/W4yJitrViZTqEGEhtoYjK99OL2H8CYBvKDYHo\nNJUeWZnc2pR7G/NMCUwc7lkBmAnE1kLstYJ374R5sbfjJb/tWKznUpPmiuX3\nS3cGGxKhBoEPWkIx6JX5oCn9sjkqwW+eV3PplpmfoQzZWBR8+GQ7Gm4mHNzE\ng63QTmqQ6DevR3+F3ugVgrwpVQzhRUqb42I9SInhuaDfnRMn4jp8nOGfuZk5\nyq4U\r\n=/pnX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDz73j+hNvJ0DWNyeaY7/Tzyn+0Lr6ozVtbsUGR33SuPAIhAMMwMKgydTlS5SLYX7H6thm8VOM/WnUF53xmCBpbJigZ"}]},"_npmUser":{"name":"alexbosworth","email":"alex.bosworth+npm@gmail.com"},"directories":{},"maintainers":[{"name":"alexbosworth","email":"alex.bosworth+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prettyjson_1.2.1_1641772620113_0.14736028341951135"},"_hasShrinkwrap":false},"1.2.2":{"author":{"name":"Rafael de Oleza","email":"rafeca@gmail.com","url":"https://github.com/rafeca"},"name":"@alexbosworth/prettyjson","description":"Package for formatting JSON data in a coloured YAML-style, perfect for CLI output","version":"1.2.2","homepage":"http://rafeca.com/prettyjson","keywords":["json","cli","formatting","colors"],"repository":{"type":"git","url":"git+https://github.com/rafeca/prettyjson.git"},"bugs":{"url":"https://github.com/rafeca/prettyjson/issues"},"main":"./lib/prettyjson","license":"MIT","scripts":{"test":"npm run jshint && mocha --reporter spec","testwin":"node ./node_modules/mocha/bin/mocha --reporter spec","jshint":"jshint lib/*.js test/*.js","coverage":"istanbul cover _mocha --report lcovonly -- -R spec","coveralls":"npm run coverage && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage","changelog":"git log $(git describe --tags --abbrev=0)..HEAD --pretty='* %s' --first-parent"},"bin":{"prettyjson":"bin/prettyjson"},"dependencies":{"colors":"1.1.2","minimist":"1.2.6"},"devDependencies":{"coveralls":"^2.11.15","istanbul":"^0.4.5","jshint":"^2.9.4","mocha":"^3.1.2","mocha-lcov-reporter":"^1.2.0","should":"^11.1.1"},"gitHead":"a669e073b49889d6d27678ac2cb82ea94d7c14d7","_id":"@alexbosworth/prettyjson@1.2.2","_nodeVersion":"16.13.1","_npmVersion":"8.3.0","dist":{"integrity":"sha512-JsqGgC96z8HFceI94ZLAXLxPXw9oMmQh9XpK5tbRSoU6A4JGz1I7ssplLOTfc50Y73bWVoEJs1ja7BcEToMFmQ==","shasum":"80d26465f4d98aeaacb4440696f4057a7c40ddcd","tarball":"https://registry.npmjs.org/@alexbosworth/prettyjson/-/prettyjson-1.2.2.tgz","fileCount":17,"unpackedSize":626489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPPHdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqY6xAAk8KfrmdIfeS7Fs75FrDZO8O451CyRoZVBomtydNW9g1vk6A2\r\nQ0VnE11gsHI8dF4gxZ681uPWyjAQsaVrE+U6GQ9+UO4med7Xe6LhKiK0qyy8\r\n6SPBeiGLOFFWL+jxd3LF01SPAWVo43p9od93j3jtX3ot6TjpMt7xxj6WtfLN\r\n+U81rk6b+TNH25guFXV2XG/kkGIemevucBbah1NcxbBaZ3I6T3EUn5mzaNog\r\nnSz81VDts7Xxo8dXuYQXqhn6lK1b75Qdg7IrSZujmV6QdmJ/CWPkRRyqqz31\r\n9PfYLEhqmnPCEBCpmo1ilf/HW+fwngDssRNWhP261g5KV1r9QsYVmqykUS3f\r\nfYrigxbe29rOdAsdjF6sU4lqnIsgZU5jW90hUSH1El6rRqeeHke7/yni2gE8\r\no+QNmZAZjfSQZzlsKLtZ5rcTadAPVhIqCbWPN/tYbiQraLGjIstq0HwTvo2a\r\nto6q34HdbJNSKWH5okPLKW5XxtXR1oDJ3ZBpPkRQrgkmCCmDRvZ3PaD9Pebf\r\nOmZRYdaB8sB1XOHM2rbbRIju7Ki/jz+BHPg45RqiHKj1E4M1daXnTmAszyRn\r\nr8NNkJW9vtJkBfEeJehVTOCqUel8SiDweBnUEdQN1UZ+4c2AxugX55UvCr0I\r\ni4VNG8M3+MxOAjP0de/oRTO36W/HVDNhJXU=\r\n=FyTF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJAQ7dEwkj8Xg+33W3bto1INdTRXwCB++cSb5zSHp15wIgeGQHr73hVc3xT7Byy7bkxrHGs2vIgyp6BS/fBDF1sFQ="}]},"_npmUser":{"name":"alexbosworth","email":"alex.bosworth+npm@gmail.com"},"directories":{},"maintainers":[{"name":"alexbosworth","email":"alex.bosworth+npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prettyjson_1.2.2_1648161245314_0.4980397535601373"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-09T23:57:00.046Z","1.2.1":"2022-01-09T23:57:00.341Z","modified":"2022-04-04T12:39:28.756Z","1.2.2":"2022-03-24T22:34:05.624Z"},"maintainers":[{"name":"alexbosworth","email":"alex.bosworth+npm@gmail.com"}],"description":"Package for formatting JSON data in a coloured YAML-style, perfect for CLI output","homepage":"http://rafeca.com/prettyjson","keywords":["json","cli","formatting","colors"],"repository":{"type":"git","url":"git+https://github.com/rafeca/prettyjson.git"},"author":{"name":"Rafael de Oleza","email":"rafeca@gmail.com","url":"https://github.com/rafeca"},"bugs":{"url":"https://github.com/rafeca/prettyjson/issues"},"license":"MIT","readme":"# prettyjson [![Build Status](https://secure.travis-ci.org/rafeca/prettyjson.png)](http://travis-ci.org/rafeca/prettyjson) [![NPM version](https://badge.fury.io/js/prettyjson.png)](http://badge.fury.io/js/prettyjson) [![Coverage Status](https://coveralls.io/repos/rafeca/prettyjson/badge.png?branch=master)](https://coveralls.io/r/rafeca/prettyjson?branch=master)\n\nPackage for formatting JSON data in a coloured YAML-style, perfect for CLI output.\n\n## How to install\n\nJust install it via NPM:\n\n```bash\n$ npm install -g prettyjson\n```\n\nThis will install `prettyjson` globally, so it will be added automatically\nto your `PATH`.\n\n## Using it (from the CLI)\n\nThis package installs a command line interface to render JSON data in a more\nconvenient way. You can use the CLI in three different ways:\n\n**Decode a JSON file:** If you want to see the contents of a JSON file, just pass\nit as the first argument to the CLI:\n\n```bash\n$ prettyjson package.json\n```\n\n![Example 1](https://raw.github.com/rafeca/prettyjson/master/images/example3.png)\n\n**Decode the stdin:** You can also pipe the result of a command (for example an\nHTTP request) to the CLI to see the JSON result in a clearer way:\n\n```bash\n$ curl https://api.github.com/users/rafeca | prettyjson\n```\n\n![Example 2](https://raw.github.com/rafeca/prettyjson/master/images/example4.png)\n\n**Decode random strings:** if you call the CLI with no arguments, you'll get a\nprompt where you can past JSON strings and they'll be automatically displayed in a clearer way:\n\n![Example 3](https://raw.github.com/rafeca/prettyjson/master/images/example5.png)\n\n### Command line options\n\nIt's possible to customize the output through some command line options:\n\n```bash\n# Change colors\n$ prettyjson --string=red --multiline_string=cyan --keys=blue --dash=yellow --number=green package.json\n\n# Do not use colors\n$ prettyjson --nocolor=1 package.json\n\n# Change indentation\n$ prettyjson --indent=4 package.json\n\n# Render arrays elements in a single line\n$ prettyjson --inline-arrays=1 package.json\n```\n\n**Deprecation Notice**: The old configuration through environment variables is\ndeprecated and it will be removed in the next major version (1.0.0).\n\n## Using it (from Node.js)\n\nIt's pretty easy to use it. You just have to include it in your script and call\nthe `render()` method:\n\n```javascript\nvar prettyjson = require('prettyjson');\n\nvar data = {\n  username: 'rafeca',\n  url: 'https://github.com/rafeca',\n  twitter_account: 'https://twitter.com/rafeca',\n  projects: ['prettyprint', 'connfu']\n};\n\nvar options = {\n  noColor: true\n};\n\nconsole.log(prettyjson.render(data, options));\n```\n\nAnd will output:\n\n![Example 4](https://raw.github.com/rafeca/prettyjson/master/images/example1.png)\n\nYou can also configure the colors of the hash keys and array dashes\n(using [colors.js](https://github.com/Marak/colors.js) colors syntax):\n\n```javascript\nvar prettyjson = require('prettyjson');\n\nvar data = {\n  username: 'rafeca',\n  url: 'https://github.com/rafeca',\n  twitter_account: 'https://twitter.com/rafeca',\n  projects: ['prettyprint', 'connfu']\n};\n\nconsole.log(prettyjson.render(data, {\n  keysColor: 'rainbow',\n  dashColor: 'magenta',\n  stringColor: 'white',\n  multilineStringColor: 'cyan'\n}));\n```\n\nWill output something like:\n\n![Example 5](https://raw.github.com/rafeca/prettyjson/master/images/example2.png)\n\n## Running Tests\n\nTo run the test suite first invoke the following command within the repo,\ninstalling the development dependencies:\n\n```bash\n$ npm install\n```\n\nthen run the tests:\n\n```bash\n$ npm test\n```\n\nOn windows, you can run the tests with:\n\n```cmd\nC:\\git\\prettyjson> npm run-script testwin\n```\n","readmeFilename":"README.md"}