Skip to content

Commit

Permalink
[#59] Add the optional extensions parameter to the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
richardgarnier committed Nov 26, 2018
1 parent 8b8744f commit 48b583a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -117,6 +117,12 @@ be the same by default, but specifying `duplicates: true` would yield:
requireDir('./dir', { noCache: true })
```

`extensions`: Array of extensions to look for instead of using `require.extensions`.

```js
requireDir('./dir', { extensions: ['.js', '.json'] })
```

## Tips

Make an `index.js` in a directory with this code to clean things up:
Expand Down

0 comments on commit 48b583a

Please sign in to comment.