Skip to content

Commit

Permalink
doc: suggest named imports
Browse files Browse the repository at this point in the history
Same issue as isaacs/minimatch#189
  • Loading branch information
isaacs committed Jan 15, 2023
1 parent db19dd2 commit d21dc9e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ Install with `npm install rimraf`.
Hybrid module, load either with `import` or `require()`.

```js
// default export is the main rimraf function
import rimraf from 'rimraf'
// default export is the main rimraf function, or use named imports
import { rimraf } from 'rimraf'
// or
const rimraf = require('rimraf').default
const { rimraf } = require('rimraf')

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

0 comments on commit d21dc9e

Please sign in to comment.