From 8fb3824ce4ae4b2b9bf73d9e20aa0191f4ada7cc Mon Sep 17 00:00:00 2001 From: Pedro Augusto de Paula Barbosa Date: Fri, 12 Mar 2021 16:34:42 -0300 Subject: [PATCH] Improve usage example in readme (#48) Co-authored-by: Sindre Sorhus --- index.d.ts | 2 ++ readme.md | 2 ++ 2 files changed, 4 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" 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"