Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/readme.md

Issue 800513006: Added vulcanize under third_party/npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/readme.md
diff --git a/node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/readme.md b/node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..ad6a178c72c0c47d52602ef457137826bed10ccc
--- /dev/null
+++ b/node_modules/vulcanize/node_modules/update-notifier/node_modules/latest-version/node_modules/package-json/node_modules/registry-url/node_modules/rc/node_modules/strip-json-comments/readme.md
@@ -0,0 +1,74 @@
+# strip-json-comments [![Build Status](https://travis-ci.org/sindresorhus/strip-json-comments.svg?branch=master)](https://travis-ci.org/sindresorhus/strip-json-comments)
+
+> Strip comments from JSON. Lets you use comments in your JSON files!
+
+This is now possible:
+
+```js
+{
+ // rainbows
+ "unicorn": /* ❤ */ "cake"
+}
+```
+
+It will remove single-line comments `//` and mult-line comments `/**/`.
+
+Also 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 and a [require hook](https://github.com/uTest/autostrip-json-comments).
+
+
+*There's already [json-comments](https://npmjs.org/package/json-comments), but it's only for Node.js and uses a naive regex to strip comments which fails on simple cases like `{"a":"//"}`. This module however parses out the comments.*
+
+
+## Install
+
+```sh
+$ npm install --save strip-json-comments
+```
+
+```sh
+$ bower install --save strip-json-comments
+```
+
+```sh
+$ component install sindresorhus/strip-json-comments
+```
+
+
+## Usage
+
+```js
+var json = '{/*rainbows*/"unicorn":"cake"}';
+JSON.parse(stripJsonComments(json));
+//=> {unicorn: 'cake'}
+```
+
+
+## API
+
+### stripJsonComments(input)
+
+#### input
+
+Type: `string`
+
+Accepts a string with JSON and returns a string without comments.
+
+
+## CLI
+
+```sh
+$ npm install --global strip-json-comments
+```
+
+```sh
+$ strip-json-comments --help
+
+strip-json-comments <input-file> > <output-file>
+# or
+cat <input-file> | strip-json-comments > <output-file>
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)

Powered by Google App Engine
This is Rietveld 408576698