{"_id":"millisecond","_rev":"363561","name":"millisecond","description":"Convert time strings to milliseconds","dist-tags":{"latest":"0.1.2"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"time":{"modified":"2021-07-13T08:59:36.000Z","created":"2014-11-28T09:38:46.461Z","0.1.2":"2015-11-20T12:32:12.803Z","0.1.1":"2015-06-28T13:47:21.359Z","0.1.0":"2015-06-08T14:09:19.301Z","0.0.1":"2014-11-29T15:33:25.917Z","0.0.0":"2014-11-28T09:38:46.461Z"},"users":{"coryrobinson42":true,"d3ck":true},"author":{"name":"Arnout Kazemier"},"repository":{"type":"git","url":"git+https://github.com/unshiftio/millisecond.git"},"versions":{"0.1.2":{"name":"millisecond","version":"0.1.2","description":"Convert time strings to milliseconds","main":"index.js","scripts":{"100%":"istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100","test":"mocha test.js","watch":"mocha --watch test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js"},"repository":{"type":"git","url":"git+https://github.com/unshiftio/millisecond.git"},"keywords":["ms","millisecond","milisecond","mili","milli","second","parse","time","string"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/unshiftio/millisecond/issues"},"devDependencies":{"assume":"1.1.x","istanbul":"0.3.x","mocha":"2.1.x","pre-commit":"1.0.x"},"homepage":"https://github.com/unshiftio/millisecond","gitHead":"994ef3ad89cb4b1e905b3d2a5c8b8938b786496b","_id":"millisecond@0.1.2","_shasum":"6cc5ad386241cab8e78aff964f87028eec92dac5","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"6cc5ad386241cab8e78aff964f87028eec92dac5","size":3741,"noattachment":false,"key":"/millisecond/-/millisecond-0.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/millisecond/download/millisecond-0.1.2.tgz"},"directories":{},"publish_time":1448022732803,"_cnpm_publish_time":1448022732803,"_hasShrinkwrap":false},"0.1.1":{"name":"millisecond","version":"0.1.1","description":"Convert time strings to milliseconds","main":"index.js","scripts":{"100%":"istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100","test":"mocha test.js","watch":"mocha --watch test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js"},"repository":{"type":"git","url":"git+https://github.com/unshiftio/millisecond.git"},"keywords":["ms","millisecond","milisecond","mili","milli","second","parse","time","string"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/unshiftio/millisecond/issues"},"devDependencies":{"assume":"1.1.x","istanbul":"0.3.x","mocha":"2.1.x","pre-commit":"1.0.x"},"homepage":"https://github.com/unshiftio/millisecond","gitHead":"e4e51f35109b51429a253433b5e7fd88fe5fbfaa","_id":"millisecond@0.1.1","_shasum":"1a2222c195ba9121cfe9a1653c182d1533bed3b0","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.12.3","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"1a2222c195ba9121cfe9a1653c182d1533bed3b0","size":3510,"noattachment":false,"key":"/millisecond/-/millisecond-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/millisecond/download/millisecond-0.1.1.tgz"},"directories":{},"publish_time":1435499241359,"_cnpm_publish_time":1435499241359,"_hasShrinkwrap":false},"0.1.0":{"name":"millisecond","version":"0.1.0","description":"Convert time strings to milliseconds","main":"index.js","scripts":{"100%":"istanbul check-coverage --statements 100 --functions 100 --lines 100 --branches 100","test":"mocha test.js","watch":"mocha --watch test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- test.js"},"repository":{"type":"git","url":"git+https://github.com/unshiftio/millisecond.git"},"keywords":["ms","millisecond","milisecond","mili","milli","second","parse","time","string"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/unshiftio/millisecond/issues"},"devDependencies":{"assume":"1.1.x","istanbul":"0.3.x","mocha":"2.1.x","pre-commit":"1.0.x"},"homepage":"https://github.com/unshiftio/millisecond","gitHead":"a821f01279959e135794b9ddfe7c46551c2cfd0e","_id":"millisecond@0.1.0","_shasum":"fe8dce710d22532e2032010e2320f193110d8bf4","_from":".","_npmVersion":"2.9.1","_nodeVersion":"0.12.3","_npmUser":{"name":"3rdeden","email":"npm@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"fe8dce710d22532e2032010e2320f193110d8bf4","size":3446,"noattachment":false,"key":"/millisecond/-/millisecond-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/millisecond/download/millisecond-0.1.0.tgz"},"directories":{},"publish_time":1433772559301,"_cnpm_publish_time":1433772559301,"_hasShrinkwrap":false},"0.0.1":{"name":"millisecond","version":"0.0.1","description":"Convert time strings to milliseconds","main":"index.js","scripts":{"test":"mocha --reporter spec --ui bdd test.js","watch":"mocha --watch --reporter spec --ui bdd test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- --reporter spec --ui bdd test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --ui bdd test.js"},"repository":{"type":"git","url":"https://github.com/unshiftio/millisecond"},"keywords":["ms","millisecond","milisecond","mili","milli","second","parse","time","string"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/unshiftio/millisecond/issues"},"devDependencies":{"assume":"0.0.x","istanbul":"0.3.x","mocha":"2.0.x","pre-commit":"0.0.x"},"homepage":"https://github.com/unshiftio/millisecond","gitHead":"ada0e3095bebc748b0751cfbc1f0f40b3677f598","_id":"millisecond@0.0.1","_shasum":"7dc43644f0df8712e26d5ddc036c151621fd578f","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"7dc43644f0df8712e26d5ddc036c151621fd578f","size":2534,"noattachment":false,"key":"/millisecond/-/millisecond-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/millisecond/download/millisecond-0.0.1.tgz"},"directories":{},"publish_time":1417275205917,"_cnpm_publish_time":1417275205917,"_hasShrinkwrap":false},"0.0.0":{"name":"millisecond","version":"0.0.0","description":"Convert time strings to milliseconds","main":"index.js","scripts":{"test":"mocha --reporter spec --ui bdd test.js","watch":"mocha --watch --reporter spec --ui bdd test.js","coverage":"istanbul cover ./node_modules/.bin/_mocha -- --reporter spec --ui bdd test.js","test-travis":"istanbul cover node_modules/.bin/_mocha --report lcovonly -- --reporter spec --ui bdd test.js"},"repository":{"type":"git","url":"https://github.com/unshiftio/millisecond"},"keywords":["ms","millisecond","milisecond","mili","milli","second","parse","time","string"],"author":{"name":"Arnout Kazemier"},"license":"MIT","bugs":{"url":"https://github.com/unshiftio/millisecond/issues"},"devDependencies":{"assume":"0.0.x","istanbul":"0.3.x","mocha":"2.0.x","pre-commit":"0.0.x"},"homepage":"https://github.com/unshiftio/millisecond","_id":"millisecond@0.0.0","_shasum":"903c5a191089a39583ff0b0cdab7df3d3866471d","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"V1","email":"info@3rd-Eden.com"},"maintainers":[{"name":"3rdeden","email":"npm@3rd-Eden.com"},{"name":"v1","email":"info@3rd-Eden.com"}],"dist":{"shasum":"903c5a191089a39583ff0b0cdab7df3d3866471d","size":2499,"noattachment":false,"key":"/millisecond/-/millisecond-0.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/millisecond/download/millisecond-0.0.0.tgz"},"directories":{},"publish_time":1417167526461,"_cnpm_publish_time":1417167526461,"_hasShrinkwrap":false}},"readme":"# millisecond\n\n[![Made by unshift][made-by]](http://unshift.io)[![Version npm][version]](http://browsenpm.org/package/millisecond)[![Build Status][build]](https://travis-ci.org/unshiftio/millisecond)[![Dependencies][david]](https://david-dm.org/unshiftio/millisecond)[![Coverage Status][cover]](https://coveralls.io/r/unshiftio/millisecond?branch=master)[![IRC channel][irc]](https://webchat.freenode.net/?channels=unshift)\n\n[made-by]: https://img.shields.io/badge/made%20by-unshift-00ffcc.svg?style=flat-square\n[version]: https://img.shields.io/npm/v/millisecond.svg?style=flat-square\n[build]: https://img.shields.io/travis/unshiftio/millisecond/master.svg?style=flat-square\n[david]: https://img.shields.io/david/unshiftio/millisecond.svg?style=flat-square\n[cover]: https://img.shields.io/coveralls/unshiftio/millisecond/master.svg?style=flat-square\n[irc]: https://img.shields.io/badge/IRC-irc.freenode.net%23unshift-00a8ff.svg?style=flat-square\n\nParse strings that indicate a time to their millisecond equivalents.\n\n## Installation\n\nThis module is written with Node.js and Browserify in mind and can therefor be\ninstalled using the node package manager:\n\n```\nnpm install --save millisecond\n```\n\n## Usage\n\nThe module exposes one single function interface, so you simply require it\nusing:\n\n```js\n'use strict';\n\nvar ms = require('millisecond');\n```\n\nAnd to parse a string simply supply it as first argument and it will return\na number. If we're unable to parse it, we will automatically return `0`.\n\n```js\nms('1 second'); // returns 1000\nms('1 ms');     // returns 1\nms('10 cows');  // returns 0\n```\n\nIt understands the following strings:\n\n- `x milliseconds`\n- `x millisecond`\n- `x msecs`\n- `x msec`\n- `x ms`\n- `x seconds`\n- `x second`\n- `x secs`\n- `x sec`\n- `x s`\n- `x minutes`\n- `x minute`\n- `x mins`\n- `x min`\n- `x m`\n- `x hours`\n- `x hour`\n- `x hrs`\n- `x hr`\n- `x h`\n- `x days`\n- `x day`\n- `x d`\n- `x weeks`\n- `x week`\n- `x wks`\n- `x wk`\n- `x w`\n- `x years`\n- `x year`\n- `x yrs`\n- `x yr`\n- `x y`\n\nThe space after the number is optional so you can also write `1ms` instead of `1\nms`. In addition to that it also accepts numbers and strings which only includes\nnumbers and we assume that these are always in milliseconds.\n\n## License\n\nMIT\n\nThis module is heavily inspired by the `ms` module which is also licensed under\nMIT. If you also need to transform numbers back in to strings I suggest you look\nat that library.\n","_attachments":{},"homepage":"https://github.com/unshiftio/millisecond","bugs":{"url":"https://github.com/unshiftio/millisecond/issues"},"license":"MIT"}