UNPKG

@zkochan/pnpm

Version:

Fast, disk space efficient package manager

112 lines (111 loc) 4.38 kB
{ "_args": [ [ { "raw": "strip-json-comments@~2.0.1", "scope": null, "escapedName": "strip-json-comments", "name": "strip-json-comments", "rawSpec": "~2.0.1", "spec": ">=2.0.1 <2.1.0", "type": "range" }, "/home/zkochan/src/pnpm/packages/pnpm/node_modules/rc" ] ], "_from": "strip-json-comments@>=2.0.1 <2.1.0", "_id": "strip-json-comments@2.0.1", "_inCache": true, "_location": "/strip-json-comments", "_nodeVersion": "4.2.4", "_npmOperationalInternal": { "host": "packages-9-west.internal.npmjs.com", "tmp": "tmp/strip-json-comments-2.0.1.tgz_1455006605207_0.8280157081317157" }, "_npmUser": { "name": "sindresorhus", "email": "sindresorhus@gmail.com" }, "_npmVersion": "3.7.2", "_phantomChildren": {}, "_requested": { "raw": "strip-json-comments@~2.0.1", "scope": null, "escapedName": "strip-json-comments", "name": "strip-json-comments", "rawSpec": "~2.0.1", "spec": ">=2.0.1 <2.1.0", "type": "range" }, "_requiredBy": [ "/rc" ], "_resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "_shasum": "3c531942e908c2697c0ec344858c286c7ca0a60a", "_shrinkwrap": null, "_spec": "strip-json-comments@~2.0.1", "_where": "/home/zkochan/src/pnpm/packages/pnpm/node_modules/rc", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, "bugs": { "url": "https://github.com/sindresorhus/strip-json-comments/issues" }, "dependencies": {}, "description": "Strip comments from JSON. Lets you use comments in your JSON files!", "devDependencies": { "ava": "*", "xo": "*" }, "directories": {}, "dist": { "shasum": "3c531942e908c2697c0ec344858c286c7ca0a60a", "tarball": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" }, "engines": { "node": ">=0.10.0" }, "files": [ "index.js" ], "gitHead": "1aef99eaa70d07981156e8aaa722e750c3b4eaf9", "homepage": "https://github.com/sindresorhus/strip-json-comments#readme", "keywords": [ "json", "strip", "remove", "delete", "trim", "comments", "multiline", "parse", "config", "configuration", "conf", "settings", "util", "env", "environment" ], "license": "MIT", "maintainers": [ { "name": "sindresorhus", "email": "sindresorhus@gmail.com" } ], "name": "strip-json-comments", "optionalDependencies": {}, "readme": "# strip-json-comments [![Build Status](https://travis-ci.org/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-json-comments)\n\n> Strip comments from JSON. Lets you use comments in your JSON files!\n\nThis is now possible:\n\n```js\n{\n\t// rainbows\n\t\"unicorn\": /* ❤ */ \"cake\"\n}\n```\n\nIt will replace single-line comments `//` and multi-line comments `/**/` with whitespace. This allows JSON error positions to remain as close as possible to the original source.\n\nAlso available as a [gulp](https://github.com/sindresorhus/gulp-strip-json-comments)/[grunt](https://github.com/sindresorhus/grunt-strip-json-comments)/[broccoli](https://github.com/sindresorhus/broccoli-strip-json-comments) plugin.\n\n\n## Install\n\n```\n$ npm install --save strip-json-comments\n```\n\n\n## Usage\n\n```js\nconst json = '{/*rainbows*/\"unicorn\":\"cake\"}';\n\nJSON.parse(stripJsonComments(json));\n//=> {unicorn: 'cake'}\n```\n\n\n## API\n\n### stripJsonComments(input, [options])\n\n#### input\n\nType: `string`\n\nAccepts a string with JSON and returns a string without comments.\n\n#### options\n\n##### whitespace\n\nType: `boolean` \nDefault: `true`\n\nReplace comments with whitespace instead of stripping them entirely.\n\n\n## Related\n\n- [strip-json-comments-cli](https://github.com/sindresorhus/strip-json-comments-cli) - CLI for this module\n- [strip-css-comments](https://github.com/sindresorhus/strip-css-comments) - Strip comments from CSS\n\n\n## License\n\nMIT © [Sindre Sorhus](http://sindresorhus.com)\n", "readmeFilename": "readme.md", "repository": { "type": "git", "url": "git+https://github.com/sindresorhus/strip-json-comments.git" }, "scripts": { "test": "xo && ava" }, "version": "2.0.1" }