Skip to content

Commit

Permalink
Fix usage instructions in README (#113)
Browse files Browse the repository at this point in the history
Refs #79

This change updates the usage instructions in the README to explain
the workaround required to use this module. As userland modules do not
hide core modules, a trailing slash is required to have Node.js use this
module over the built-in.
  • Loading branch information
whymarrh committed Oct 23, 2020
1 parent 98fb2ca commit 6cd1ddd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ npm install punycode --save

In [Node.js](https://nodejs.org/):

> ⚠️ Note that userland modules don't hide core modules.
> For example, `require('punycode')` still imports the deprecated core module even if you executed `npm install punycode`.
> Use `require('punycode/')` to import userland modules rather than core modules.
```js
const punycode = require('punycode');
const punycode = require('punycode/');
```

## API
Expand Down

0 comments on commit 6cd1ddd

Please sign in to comment.