Skip to content

Commit

Permalink
doc(readme): Updates install info and tested Node.js versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lupomontero committed Nov 28, 2024
1 parent 1fd3665 commit 18a6d33
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,35 +35,30 @@ details.

### Node.js

This module is tested on Node.js v8, v10, v12, v14, v16, v18, v20 and v22. See
[`.github/workflows/node.js.yml`](.github/workflows/node.js.yml).

```sh
npm install psl
```

#### ESM

From version `v1.11.0` you can now import `psl` as ESM.
From version `v1.13.0` you can now import `psl` as ESM.

```js
import psl from 'psl';
```

#### CommonJS

If your project still uses CommonJS on Node.js v12 or later (with support for
conditional exports), you can continue importing the module like in previous
versions.
If your project still uses CommonJS, you can continue importing the module like
in previous versions.

```js
const psl = require('psl');
```

⚠️ If you are using Node.js v10 or older (😰), you can still use the latest
version of this module, but you will need to import the bundled UMD.

```js
var psl = require('psl/dist/psl.umd.cjs');
```

### Browser

#### Using a bundler
Expand Down

0 comments on commit 18a6d33

Please sign in to comment.