Skip to content

Commit c1142e1

Browse files
committed
BREAKING CHANGE: use ESM only
1 parent cd529e4 commit c1142e1

9 files changed

+11
-28
lines changed

README.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Learn more about [What is a URL](https://developer.mozilla.org/en-US/docs/Learn/
88

99
## Supports
1010

11-
Both the browser and nodejs.
11+
- ESM
12+
- Node.js
13+
- Browser
1214

1315
## Usage
1416

@@ -35,22 +37,12 @@ bun test:watch
3537
- @param {GetDomainOptions} opts `{ tld: true }` permit to get Top Level Domain like `*.co.uk`
3638
- @returns {Urls | Promise<Urls>} Returns URL(s) or a promise of URL(s) if the PSL lib is being used
3739

38-
```js
39-
const res = extractDomain(urls, options);
40-
```
41-
42-
ES6 Import
40+
ESM import
4341

4442
```js
4543
import extractDomain from 'extract-domain';
4644
```
4745

48-
CommonJS Require
49-
50-
```js
51-
const extractDomain = require('extract-domain');
52-
```
53-
5446
Examples
5547

5648
```js

dist/extract-domain.cjs

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/extract-domain.cjs.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/extract-domain.modern.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

dist/extract-domain.modern.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)