Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

strip-json-comments-cli

sindresorhus128.5kMIT3.0.0

Strip comments from JSON. Lets you use comments in your JSON files!

cli-app, cli, json, strip, remove, delete, trim, comments, multiline, parse, config, configuration, settings, util, env, environment

readme

strip-json-comments-cli

Strip comments from JSON. Lets you use comments in your JSON files!

It also strips trailing commas.

Install

npm install --global strip-json-comments-cli

Usage

$ strip-json-comments --help

  Usage
    $ strip-json-comments <input-file> > <output-file>
    $ strip-json-comments < <input-string>

  Options
    --no-whitespace  Remove comments instead of replacing them with whitespace

  Example
    $ strip-json-comments input.json > output.json