{"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":"V1","email":"info@3rd-Eden.com"},{"name":"unshift","email":"npm@unshift.io"}],"dist":{"shasum":"7dc43644f0df8712e26d5ddc036c151621fd578f","tarball":"http://registry-npm.ywwl.com/millisecond/download/millisecond-0.0.1.tgz","integrity":"sha512-ppMv9aGpOZc2DmpI4kVHsTXsiPC2bDHhDk4CHCYVCxF/C9+uIPt8cM06oCv4y4Yx5KQocxDvDh/TX7kL/oda/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHgBkNqoz+QXLyaTNX2BL2QzkdVhIqbfVvUz+K9H4G9iAiBUpGklMrr2APCDwk8sLhiEnnNpCXtT/xpD+XMBRTHdHg=="}],"size":2534,"noattachment":false,"key":"/millisecond/-/millisecond-0.0.1.tgz"},"directories":{},"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","publish_time":1417275205917,"_cnpm_publish_time":1417275205917,"dist-tags":{"latest":"0.1.2"}}