Skip to content

Commit

Permalink
[AT] - update readme to contain instructions on how to use with ES mo…
Browse files Browse the repository at this point in the history
…dules import. [EvanHahn#153]
  • Loading branch information
Andrew Tran committed Jul 25, 2019
1 parent 7941b76 commit 6ec4fd8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ Basic usage

This package is available as *humanize-duration* on [npm](https://www.npmjs.com/package/humanize-duration) and Bower. You can also include the JavaScript file in the browser.

With `ES Modules`:

```js
import * as humanizeDuration from 'humanize-duration';
humanizeDuration(12000) // '12 seconds'
```

With `require` (like in Node or with common build systems):

```js
Expand Down

0 comments on commit 6ec4fd8

Please sign in to comment.