Skip to content

Commit

Permalink
Applied a few text improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed May 16, 2017
1 parent 9b88d15 commit 15dc8c5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ ms('1y') // 31557600000
ms('100') // 100
```

### Convert from milliseconds
### Convert from Milliseconds

```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
ms(ms('10 hours')) // "10h"
```

### Time format written-out
### Time Format Written-Out

```js
ms(60000, { long: true }) // "1 minute"
Expand All @@ -37,15 +37,15 @@ ms(ms('10 hours'), { long: true }) // "10 hours"

## Features

- Works both in [node](https://nodejs.org) and in the browser.
- If a number is supplied to `ms`, a string with a unit is returned.
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
- Works both in [Node.js](https://nodejs.org) and in the browser
- If a number is supplied to `ms`, a string with a unit is returned
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned

## Caught a bug?
## Caught a Bug?

1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Link the package to the global module directory: `npm link`
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!

As always, you can run the tests using: `npm test`

0 comments on commit 15dc8c5

Please sign in to comment.