Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Apr 14, 2022
1 parent b3f6f6f commit d712ef9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# 4.0.0 - 2022-04-14
### Changed
* Converting the project to ES6 module. If you run Throttle by command line it will work exactly as before except that we dropped support for NodeJS 10 [#67](https://github.com/sitespeedio/throttle/pull/67).
* Converting the project to ES6 module. If you run Throttle by command line it will work exactly as before except that we dropped support for NodeJS 10 [#67](https://github.com/sitespeedio/throttle/pull/67). You can read [Sindre Sorhus ESM package guide](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).

### Fixed
* Updated dev dependencies to latest versions [#68](https://github.com/sitespeedio/throttle/pull/68)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ throttle --stop --localhost
## Use directly in NodeJS

```javascript
const throttle = require('@sitespeed.io/throttle');
import throttle from '@sitespeed.io/throttle'
// Returns a promise
throttle.start({up: 360, down: 780, rtt: 200}).then(() => ...
```
or
```javascript
const throttle = require('@sitespeed.io/throttle');
import throttle from '@sitespeed.io/throttle'
// Returns a promise
const options = {up: 360, down: 780, rtt: 200};
await throttle.start(options);
Expand Down

0 comments on commit d712ef9

Please sign in to comment.