Skip to content

Commit

Permalink
[readme] adjustment of CommonJS and ECMAScript notation
Browse files Browse the repository at this point in the history
  • Loading branch information
unikounio committed Mar 15, 2024
1 parent 04a4451 commit 2b65c39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ fanciful decoration.

# example

Example files: [example/parse.js](./example/parse.js) (CommonJS) / [example/parse.mjs](./example/parse.mjs) (ECMAScript)
Example files: [example/parse.js](./example/parse.js) (CJS) / [example/parse.mjs](./example/parse.mjs) (ESM)

``` js
// for CJS
const argv = require('minimist')(process.argv.slice(2));

// for ESM
// import minimist from 'minimist'; // (for ECMAScript)
// import minimist from 'minimist';
// const argv = minimist(process.argv.slice(2));
console.log(argv);
```
Expand Down

0 comments on commit 2b65c39

Please sign in to comment.