demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/ms-2.0.0/readme.md

Path
demo___customer_pitch-c4152739-a50b-4b5b-9d4d-0561461666d9.zip-extract/_dependencies/npm/ms-2.0.0/readme.md
Status
scanned
Type
file
Name
readme.md
Extension
.md
Programming language

      
    
Mime type
text/plain
File type
ASCII text
Tag

      
    
Rootfs path

      
    
Size
1721 (1.7 KB)
MD5
90e631c6afccde3ed414d3d230734864
SHA1
e875d9fa741fe44893c778974860f362724e35ec
SHA256
c9ac67ff103c01871b0ff09e2f094631991908c1fd0dc08bdb53287e5a760ae5
SHA512

      
    
SHA1_git
84a9974cccd81f9296b7d3c77f2b0d2765dfe181
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
readme.md | 1.7 KB |

# ms [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) Use this package to easily convert various time formats to milliseconds. ## Examples ```js ms('2 days') // 172800000 ms('1d') // 86400000 ms('10h') // 36000000 ms('2.5 hrs') // 9000000 ms('2h') // 7200000 ms('1m') // 60000 ms('5s') // 5000 ms('1y') // 31557600000 ms('100') // 100 ``` ### Convert from milliseconds ```js ms(60000) // "1m" ms(2 * 60000) // "2m" ms(ms('10 hours')) // "10h" ``` ### Time format written-out ```js ms(60000, { long: true }) // "1 minute" ms(2 * 60000, { long: true }) // "2 minutes" 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. ## 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! As always, you can run the tests using: `npm test`
URL Start line End line
https://travis-ci.org/zeit/ms.svg?branch=master 3 3
https://travis-ci.org/zeit/ms 3 3
http://zeit-slackin.now.sh/badge.svg 4 4
https://zeit.chat/ 4 4
https://nodejs.org/ 40 40
https://help.github.com/articles/fork-a-repo 47 47
https://help.github.com/articles/cloning-a-repository 47 47
Package URL License Primary language
pkg:npm/acme-demo-app@1.0.0 JavaScript
pkg:npm/ms@2.0.0 mit JavaScript