Skip to content

Commit 8fb3824

Browse files
papbsindresorhus
andauthored
Improve usage example in readme (#48)
Co-authored-by: Sindre Sorhus <[email protected]>
1 parent ea016e0 commit 8fb3824

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ It will replace single-line comments `//` and multi-line comments `/**\/` with w
1919
2020
@example
2121
```
22+
import stripJsonComments = require('strip-json-comments');
23+
2224
const json = `{
2325
// Rainbows
2426
"unicorn": "cake"

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ $ npm install strip-json-comments
2424
## Usage
2525

2626
```js
27+
const stripJsonComments = require('strip-json-comments');
28+
2729
const json = `{
2830
// Rainbows
2931
"unicorn": /* ❤ */ "cake"

0 commit comments

Comments
 (0)