Skip to content

Commit d21dc9e

Browse files
committed
doc: suggest named imports
Same issue as isaacs/minimatch#189
1 parent db19dd2 commit d21dc9e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ Install with `npm install rimraf`.
2020
Hybrid module, load either with `import` or `require()`.
2121

2222
```js
23-
// default export is the main rimraf function
24-
import rimraf from 'rimraf'
23+
// default export is the main rimraf function, or use named imports
24+
import { rimraf } from 'rimraf'
2525
// or
26-
const rimraf = require('rimraf').default
26+
const { rimraf } = require('rimraf')
2727

2828
// other strategies exported as well
2929
import { rimraf, rimrafSync, native, nativeSync } from 'rimraf'

0 commit comments

Comments
 (0)