From 15dc8c5b5a9e8372555400485a749ec04cc02444 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Tue, 16 May 2017 14:35:37 +0200 Subject: [PATCH] Applied a few text improvements --- readme.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/readme.md b/readme.md index 84a9974..e5ae0c8 100644 --- a/readme.md +++ b/readme.md @@ -19,7 +19,7 @@ ms('1y') // 31557600000 ms('100') // 100 ``` -### Convert from milliseconds +### Convert from Milliseconds ```js ms(60000) // "1m" @@ -27,7 +27,7 @@ ms(2 * 60000) // "2m" ms(ms('10 hours')) // "10h" ``` -### Time format written-out +### Time Format Written-Out ```js ms(60000, { long: true }) // "1 minute" @@ -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`