From 4d0202e7304ef4c2153e498400587a98ce1cb835 Mon Sep 17 00:00:00 2001 From: Pedro Augusto de Paula Barbosa Date: Thu, 11 Mar 2021 14:17:40 -0300 Subject: [PATCH 1/2] Improve usage example in readme --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index d3ce4eb..fd02688 100644 --- a/readme.md +++ b/readme.md @@ -24,6 +24,8 @@ $ npm install strip-json-comments ## Usage ```js +const stripJsonComments = require('strip-json-comments'); + const json = `{ // Rainbows "unicorn": /* ❤ */ "cake" From 190550af76f6748ca48d69d5a91e07bde82e3b45 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 13 Mar 2021 02:34:24 +0700 Subject: [PATCH 2/2] Update index.d.ts --- index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.d.ts b/index.d.ts index 28ba3c8..655a92d 100644 --- a/index.d.ts +++ b/index.d.ts @@ -19,6 +19,8 @@ It will replace single-line comments `//` and multi-line comments `/**\/` with w @example ``` +import stripJsonComments = require('strip-json-comments'); + const json = `{ // Rainbows "unicorn": "cake"