mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 15:24:46 -05:00
ce7dc2be92
Adds support for running npm package lifecycle scripts, opted into via a new `--allow-scripts` flag. With this PR, when running `deno cache` (or `DENO_FUTURE=1 deno install`) you can specify the `--allow-scripts=pkg1,pkg2` flag to run lifecycle scripts attached to the given packages. Note at the moment this only works when `nodeModulesDir` is true (using the local resolver). When a package with un-run lifecycle scripts is encountered, we emit a warning suggesting things may not work and to try running lifecycle scripts. Additionally, if a package script implicitly requires `node-gyp` and it's not found on the system, we emit a warning. Extra things in this PR: - Extracted out bits of `task.rs` into a separate module for reuse - Added a couple fields to `process.config` in order to support `node-gyp` (it relies on a few variables being there) - Drive by fix to downloading new npm packages to test registry --- TODO: - [x] validation for allow-scripts args (make sure it looks like an npm package) - [x] make allow-scripts matching smarter - [ ] figure out what issues this closes --- Review notes: - This adds a bunch of deps to our test registry due to using `node-gyp`, so it's pretty noisy
1 line
No EOL
83 KiB
JSON
1 line
No EOL
83 KiB
JSON
{"_id":"ms","_rev":"410-6b052b9a8bb3f70604c23ac3286db83b","name":"ms","description":"Tiny millisecond conversion utility","dist-tags":{"latest":"2.1.3","beta":"3.0.0-beta.2","canary":"3.0.0-canary.1"},"versions":{"0.1.0":{"name":"ms","version":"0.1.0","description":"Tiny ms conversion utility","main":"./ms","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"_id":"ms@0.1.0","dependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"f21fac490daf1d7667fd180fe9077389cc9442b2","tarball":"http://localhost:4260/ms/ms-0.1.0.tgz","integrity":"sha512-7uwYj3Xip4rOFpe5dDy+C25Ad0nAXkT4yAVMSpuh1UYR2Z7tAswSh4wb/HghRa533wofFUsvg54OQ90Mu1dCJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICUgMnbu4P+yWGs9zpkWDoZJsS3hgrwmM1OE23QR0d98AiAaQaF6n0DTpxKiluPo/kDhJPZM3eOe4ydmWBn7qdFQvA=="}]},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"directories":{}},"0.2.0":{"name":"ms","version":"0.2.0","description":"Tiny ms conversion utility","main":"./ms","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"_id":"ms@0.2.0","dist":{"shasum":"6edfc5a063471f7bfd35a5831831c24275ce9dc5","tarball":"http://localhost:4260/ms/ms-0.2.0.tgz","integrity":"sha512-3hmNMG0TYmTiQD6+s+b9eKLYWYTbR+6AgZtOu60jiedzeu2JK9NS6Ih1vosLwxLutvG45slW7/fVaCM8WDXGRQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbW6HLL8Ey4ocELaj55R0v4h1Y0IEM/ruv1ZCA3ysjtAIhAPKjWgoNAewkRA4Dyt06S4tl+ltcrCQYE7f5QtUYV3Cq"}]},"_npmVersion":"1.1.59","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"directories":{}},"0.3.0":{"name":"ms","version":"0.3.0","description":"Tiny ms conversion utility","main":"./ms","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"_id":"ms@0.3.0","dist":{"shasum":"03edc348d613e66a56486cfdac53bcbe899cbd61","tarball":"http://localhost:4260/ms/ms-0.3.0.tgz","integrity":"sha512-25BVmSAdN4KRX7XeI6/gwQ9ewx6t9QB9/8X2fVJUUDpPc03qTRaEPgt5bTMZQ5T2l+XT+haSfqIkysOupDsSVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICl0UM913l31pPCLrluPWicYNhjKL8fq2sDRaP01B9BNAiEA/fe88H1OpqYmtUUjhZ5KNRWpZrRBDG/uRPsFcflAyE0="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"directories":{}},"0.4.0":{"name":"ms","version":"0.4.0","description":"Tiny ms conversion utility","main":"./index","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"_id":"ms@0.4.0","dist":{"shasum":"77ade5470b099bb2d83e232c25763c18cd6963f1","tarball":"http://localhost:4260/ms/ms-0.4.0.tgz","integrity":"sha512-64oIDtd4AvWd9+PXu3mS+e+83nD/4+vDjORXYUrMsUodlxSgxHt6okjkFO94XAG+zDoBz7GPkCYFXd5OD++kJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCz14OGpHKaDD24wOoieXnwbeSlCqRrEsfmph2o3+HmDwIhAP9I/6kfqCCePbEME8I/sip0IU032f0UZ9dQ/GfuDw0o"}]},"_npmVersion":"1.1.59","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"directories":{}},"0.5.0":{"name":"ms","version":"0.5.0","description":"Tiny ms conversion utility","main":"./index","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"_id":"ms@0.5.0","dist":{"shasum":"8e52e7e1bf521f9cea30f726de958822eab0ee27","tarball":"http://localhost:4260/ms/ms-0.5.0.tgz","integrity":"sha512-l+4vT0spctuJn4dEuiTHFJg/o2Gu7lcPPVmoEkOvCJ7q6btdsvokZscv1rAj5rokCmiqZRWpA/apQSpgDv8ZSw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBMCGPbnJt2mm9aZLXrc2nvN1SoqdaEr5WnXpTwQdV7vAiBM8iGSLAHXldFSeSQTgDK3sxFpMymGVpYCxfKWqgu0hQ=="}]},"_npmVersion":"1.1.59","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"directories":{}},"0.5.1":{"name":"ms","version":"0.5.1","description":"Tiny ms conversion utility","main":"./index","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"component":{"scripts":{"ms/index.js":"index.js"}},"_id":"ms@0.5.1","dist":{"shasum":"98058c8f9c64854d1703ab92bf3f1dcc8e713b4c","tarball":"http://localhost:4260/ms/ms-0.5.1.tgz","integrity":"sha512-DgU7MSi4T3XY43mZL/Lgk31wqwe2NB56QsyVMcY3m5rICuAp+/uY1/w3lnjhPSaTYVdx1vZQ+ppUlH4AlJ6UAA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZflkCSwiIpOjLgUAFLDgJwYRXjT4qLaAnT6zAkgOVwAiEAkCg32KSxT/4+atWti00h8UTyaQl6K2SZ3WU/7pstohM="}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"directories":{}},"0.6.0":{"name":"ms","version":"0.6.0","description":"Tiny ms conversion utility","main":"./index","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"component":{"scripts":{"ms/index.js":"index.js"}},"_id":"ms@0.6.0","dist":{"shasum":"21dc16a7d1dc2d8ed244dc0e6a71a5c2612b623b","tarball":"http://localhost:4260/ms/ms-0.6.0.tgz","integrity":"sha512-twVBDoonss/A6chyHOAQkx8Y+daAablgQy4khn8vYnrbcU4UvLLLFX2TCVhbGOXxTxJ4pqQtlTzjBErRyq/NDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhv/3tf26sR9H8GzwQMHSVcinaGJZwuKbmTzFDoozSrwIhAL+fJiKJ20Aj0cQ2/QctUHyJVXamqw0+AhAQGi9NMr4q"}]},"_from":".","_npmVersion":"1.2.10","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"directories":{}},"0.6.1":{"name":"ms","version":"0.6.1","description":"Tiny ms conversion utility","main":"./index","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"component":{"scripts":{"ms/index.js":"index.js"}},"_id":"ms@0.6.1","dist":{"shasum":"ed57e5f3fc736e09afc85017c5c912a47bc59ab9","tarball":"http://localhost:4260/ms/ms-0.6.1.tgz","integrity":"sha512-TAjpu7RNwH/eBQfmrVg6eA6hClZfmhd3B2Ghp/Di5HMLjNBhd44KtO5lWjQj0EayygL1BsfZEJe3Y4sBHMQQEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+OnvSUlnmsavDONG0bVMAdqiV7NovCVOZQQ3bxNupwAiEA6lNDCDxtfrMbenGmudYz2QXJopvskEwHujahKewJMSI="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"directories":{}},"0.6.2":{"name":"ms","version":"0.6.2","description":"Tiny ms conversion utility","repository":{"type":"git","url":"git://github.com/guille/ms.js.git"},"main":"./index","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"component":{"scripts":{"ms/index.js":"index.js"}},"bugs":{"url":"https://github.com/guille/ms.js/issues"},"_id":"ms@0.6.2","dist":{"shasum":"d89c2124c6fdc1353d65a8b77bf1aac4b193708c","tarball":"http://localhost:4260/ms/ms-0.6.2.tgz","integrity":"sha512-/pc3eh7TWorTtbvXg8je4GvrvEqCfH7PA3P7iW01yL2E53FKixzgMBaQi0NOPbMJqY34cBSvR0tZtmlTkdUG4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCgitVLdKKJz4S5O5PNLSgVL8RtKD4gCS5gxJ9TsxtawIgJeLTkc3mJ3TYQWywa7RFPbSYpIEaELEoZ6NTfB/xL3o="}]},"_from":".","_npmVersion":"1.2.30","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"directories":{}},"0.7.0":{"name":"ms","version":"0.7.0","description":"Tiny ms conversion utility","repository":{"type":"git","url":"git://github.com/guille/ms.js.git"},"main":"./index","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"component":{"scripts":{"ms/index.js":"index.js"}},"gitHead":"1e9cd9b05ef0dc26f765434d2bfee42394376e52","bugs":{"url":"https://github.com/guille/ms.js/issues"},"homepage":"https://github.com/guille/ms.js","_id":"ms@0.7.0","scripts":{},"_shasum":"865be94c2e7397ad8a57da6a633a6e2f30798b83","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"dist":{"shasum":"865be94c2e7397ad8a57da6a633a6e2f30798b83","tarball":"http://localhost:4260/ms/ms-0.7.0.tgz","integrity":"sha512-YmuMMkfOZzzAftlHwiQxFepJx/5rDaYi9o9QanyBCk485BRAyM/vB9XoYlZvglxE/pmAWOiQgrdoE10watiK9w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCtVALwxJFNy03+cbKpigsVH5j6aF2phAMKFWQ1So8InwIhAI/lcstQyWGjS4MEqbxhe61oQtzWjrqBy3wlB73tQ2QM"}]},"directories":{}},"0.7.1":{"name":"ms","version":"0.7.1","description":"Tiny ms conversion utility","repository":{"type":"git","url":"git://github.com/guille/ms.js.git"},"main":"./index","devDependencies":{"mocha":"*","expect.js":"*","serve":"*"},"component":{"scripts":{"ms/index.js":"index.js"}},"gitHead":"713dcf26d9e6fd9dbc95affe7eff9783b7f1b909","bugs":{"url":"https://github.com/guille/ms.js/issues"},"homepage":"https://github.com/guille/ms.js","_id":"ms@0.7.1","scripts":{},"_shasum":"9cd13c03adbff25b65effde7ce864ee952017098","_from":".","_npmVersion":"2.7.5","_nodeVersion":"0.12.2","_npmUser":{"name":"rauchg","email":"rauchg@gmail.com"},"maintainers":[{"name":"rauchg","email":"rauchg@gmail.com"}],"dist":{"shasum":"9cd13c03adbff25b65effde7ce864ee952017098","tarball":"http://localhost:4260/ms/ms-0.7.1.tgz","integrity":"sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAh/B/bDLriFcyK2amvVwmthEFeNv1XC0b0oEDSJbLfcAiEA83Vcj0kgtbPmVCXfJPGF7BxNZBca+FMeCIZCbD2rGCw="}]},"directories":{}},"0.7.2":{"name":"ms","version":"0.7.2","description":"Tiny milisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/zeit/ms.git"},"main":"./index","files":["index.js"],"scripts":{"test":"xo && mocha test/index.js","test-browser":"serve ./test"},"license":"MIT","devDependencies":{"expect.js":"^0.3.1","mocha":"^3.0.2","serve":"^1.4.0","xo":"^0.17.0"},"component":{"scripts":{"ms/index.js":"index.js"}},"xo":{"space":true,"semicolon":false,"envs":["mocha"],"rules":{"complexity":0}},"gitHead":"ac92a7e0790ba2622a74d9d60690ca0d2c070a45","bugs":{"url":"https://github.com/zeit/ms/issues"},"homepage":"https://github.com/zeit/ms#readme","_id":"ms@0.7.2","_shasum":"ae25cf2512b3885a1d95d7f037868d8431124765","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.8.0","_npmUser":{"name":"leo","email":"leo@zeit.co"},"dist":{"shasum":"ae25cf2512b3885a1d95d7f037868d8431124765","tarball":"http://localhost:4260/ms/ms-0.7.2.tgz","integrity":"sha512-5NnE67nQSQDJHVahPJna1PQ/zCXMnQop3yUCxjKPNzCxuyPSKWTQ/5Gu5CZmjetwGLWRA+PzeF5thlbOdbQldA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEYNaFIYpVNHRPffvUdupOK9tTNlIohwSMDFUl9gyeqaAiBEcqCkVOtW/XhlVHcvhj2xo2Vn88U05QUt8roCPdDjgA=="}]},"maintainers":[{"name":"leo","email":"leo@zeit.co"},{"name":"rauchg","email":"rauchg@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ms-0.7.2.tgz_1477383407940_0.4743474116548896"},"directories":{}},"0.7.3":{"name":"ms","version":"0.7.3","description":"Tiny milisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/zeit/ms.git"},"main":"./index","files":["index.js"],"scripts":{"test":"xo && mocha test/index.js","test-browser":"serve ./test"},"license":"MIT","devDependencies":{"expect.js":"0.3.1","mocha":"3.0.2","serve":"5.0.1","xo":"0.17.0"},"component":{"scripts":{"ms/index.js":"index.js"}},"xo":{"space":true,"semicolon":false,"envs":["mocha"],"rules":{"complexity":0}},"gitHead":"2006a7706041443fcf1f899b5752677bd7ae01a8","bugs":{"url":"https://github.com/zeit/ms/issues"},"homepage":"https://github.com/zeit/ms#readme","_id":"ms@0.7.3","_shasum":"708155a5e44e33f5fd0fc53e81d0d40a91be1fff","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.6.0","_npmUser":{"name":"leo","email":"leo@zeit.co"},"dist":{"shasum":"708155a5e44e33f5fd0fc53e81d0d40a91be1fff","tarball":"http://localhost:4260/ms/ms-0.7.3.tgz","integrity":"sha512-lrKNzMWqQZgwJahtrtrM+9NgOoDUveDrVmm5aGXrf3BdtL0mq7X6IVzoZaw+TfNti29eHd1/8GI+h45K5cQ6/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPT8epXfmpMGvrTsUkcuWcK3MQdTy8KB408Uf8bPxeIgIhAMAjOW0HmRkZI5OyL60oN9xdNQb+Tvfr9eT1yaIt68x3"}]},"maintainers":[{"name":"leo","email":"leo@zeit.co"},{"name":"rauchg","email":"rauchg@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ms-0.7.3.tgz_1489010366101_0.14404030703008175"},"directories":{}},"1.0.0":{"name":"ms","version":"1.0.0","description":"Tiny milisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/zeit/ms.git"},"main":"./index","files":["index.js"],"scripts":{"precommit":"lint-staged","lint":"eslint lib/* bin/*","test":"mocha tests.js"},"eslintConfig":{"extends":"eslint:recommended","env":{"node":true,"es6":true}},"lint-staged":{"*.js":["npm run lint","prettier --single-quote --write","git add"]},"license":"MIT","devDependencies":{"eslint":"3.18.0","expect.js":"0.3.1","husky":"0.13.2","lint-staged":"3.4.0","mocha":"3.0.2"},"gitHead":"7daf984a9011e720cc3c165ed82c4506f3471b37","bugs":{"url":"https://github.com/zeit/ms/issues"},"homepage":"https://github.com/zeit/ms#readme","_id":"ms@1.0.0","_shasum":"59adcd22edc543f7b5381862d31387b1f4bc9473","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"leo","email":"leo@zeit.co"},"dist":{"shasum":"59adcd22edc543f7b5381862d31387b1f4bc9473","tarball":"http://localhost:4260/ms/ms-1.0.0.tgz","integrity":"sha512-85ytwCiGUnD84ui6ULG1KBFMaZgHW3jg5KPr9jt+ZPYt75+XK+JGbYddGrBQ+RSHXOhekCnCZwJywBoFvFl0kw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICKGVNMx/wRg/73WuAJk6cBE7jiz6Q2yxkbeq6B5Oz82AiEAxy5ucslI5Ct+mjRIDp8Q+T1X6mn+a3acKHCKpAG5vRM="}]},"maintainers":[{"name":"leo","email":"leo@zeit.co"},{"name":"rauchg","email":"rauchg@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/ms-1.0.0.tgz_1489959793252_0.42147551802918315"},"directories":{}},"2.0.0":{"name":"ms","version":"2.0.0","description":"Tiny milisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/zeit/ms.git"},"main":"./index","files":["index.js"],"scripts":{"precommit":"lint-staged","lint":"eslint lib/* bin/*","test":"mocha tests.js"},"eslintConfig":{"extends":"eslint:recommended","env":{"node":true,"es6":true}},"lint-staged":{"*.js":["npm run lint","prettier --single-quote --write","git add"]},"license":"MIT","devDependencies":{"eslint":"3.19.0","expect.js":"0.3.1","husky":"0.13.3","lint-staged":"3.4.1","mocha":"3.4.1"},"gitHead":"9b88d1568a52ec9bb67ecc8d2aa224fa38fd41f4","bugs":{"url":"https://github.com/zeit/ms/issues"},"homepage":"https://github.com/zeit/ms#readme","_id":"ms@2.0.0","_shasum":"5608aeadfc00be6c2901df5f9861788de0d597c8","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.8.0","_npmUser":{"name":"leo","email":"leo@zeit.co"},"dist":{"shasum":"5608aeadfc00be6c2901df5f9861788de0d597c8","tarball":"http://localhost:4260/ms/ms-2.0.0.tgz","integrity":"sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYXYoFltYf81nBW7DQpNjYSZEegqIVzjASdvw/XwCIGwIgAQ1zDH6y0Dzva9FcQbckvTwThyFbVDdT1p7PIGfg+LU="}]},"maintainers":[{"name":"leo","email":"leo@zeit.co"},{"name":"rauchg","email":"rauchg@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/ms-2.0.0.tgz_1494937565215_0.34005374647676945"},"directories":{}},"2.1.0":{"name":"ms","version":"2.1.0","description":"Tiny millisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/zeit/ms.git"},"main":"./index","files":["index.js"],"scripts":{"precommit":"lint-staged","lint":"eslint lib/* bin/*","test":"mocha tests.js"},"eslintConfig":{"extends":"eslint:recommended","env":{"node":true,"es6":true}},"lint-staged":{"*.js":["npm run lint","prettier --single-quote --write","git add"]},"license":"MIT","devDependencies":{"eslint":"4.12.1","expect.js":"0.3.1","husky":"0.14.3","lint-staged":"5.0.0","mocha":"4.0.1"},"gitHead":"845c302f155d955141d623a0276bbff3529ed626","bugs":{"url":"https://github.com/zeit/ms/issues"},"homepage":"https://github.com/zeit/ms#readme","_id":"ms@2.1.0","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"leo","email":"leo@zeit.co"},"dist":{"integrity":"sha512-gVZHb22Z7YDyiiaoGld9LD4tUuDDxdkDJUEfTIej9LFePFqiE9JxI0qTFfu6tD7Wu03lg7skmVwTmA6XkeMlPQ==","shasum":"9a345be8f6a4aadc6686d74d88a23c1b84720549","tarball":"http://localhost:4260/ms/ms-2.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6ct/FoEj38rHsHVN+ZLKlXQfH0Swo0I94hVtIoQUxiAiEA0LUEHUYdZhIZnAgw8V+P4QNbmNMfY9N1QSkb65ZE6cw="}]},"maintainers":[{"name":"leo","email":"leo@zeit.co"},{"name":"rauchg","email":"rauchg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ms-2.1.0.tgz_1512060855394_0.6358025514055043"},"directories":{}},"2.1.1":{"name":"ms","version":"2.1.1","description":"Tiny millisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/zeit/ms.git"},"main":"./index","files":["index.js"],"scripts":{"precommit":"lint-staged","lint":"eslint lib/* bin/*","test":"mocha tests.js"},"eslintConfig":{"extends":"eslint:recommended","env":{"node":true,"es6":true}},"lint-staged":{"*.js":["npm run lint","prettier --single-quote --write","git add"]},"license":"MIT","devDependencies":{"eslint":"4.12.1","expect.js":"0.3.1","husky":"0.14.3","lint-staged":"5.0.0","mocha":"4.0.1"},"gitHead":"fe0bae301a6c41f68a01595658a4f4f0dcba0e84","bugs":{"url":"https://github.com/zeit/ms/issues"},"homepage":"https://github.com/zeit/ms#readme","_id":"ms@2.1.1","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"leo","email":"leo@zeit.co"},"dist":{"integrity":"sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==","shasum":"30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a","tarball":"http://localhost:4260/ms/ms-2.1.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNwDicPfUKOIZ69PqiMYUAEqnRA+H4zk0kq9GpcOAqrAiA+oLpPxjd2opwatXoRpO+5VwyQyHaqAohY6RW8E8seyA=="}]},"maintainers":[{"name":"leo","email":"leo@zeit.co"},{"name":"rauchg","email":"rauchg@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ms-2.1.1.tgz_1512066615982_0.7117063472978771"},"directories":{}},"2.1.2":{"name":"ms","version":"2.1.2","description":"Tiny millisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/zeit/ms.git"},"main":"./index","scripts":{"precommit":"lint-staged","lint":"eslint lib/* bin/*","test":"mocha tests.js"},"eslintConfig":{"extends":"eslint:recommended","env":{"node":true,"es6":true}},"lint-staged":{"*.js":["npm run lint","prettier --single-quote --write","git add"]},"license":"MIT","devDependencies":{"eslint":"4.12.1","expect.js":"0.3.1","husky":"0.14.3","lint-staged":"5.0.0","mocha":"4.0.1"},"gitHead":"7920885eb232fbe7a5efdab956d3e7c507c92ddf","bugs":{"url":"https://github.com/zeit/ms/issues"},"homepage":"https://github.com/zeit/ms#readme","_id":"ms@2.1.2","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"styfle","email":"steven@ceriously.com"},"dist":{"integrity":"sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==","shasum":"d09d1f357b443f493382a8eb3ccd183872ae6009","tarball":"http://localhost:4260/ms/ms-2.1.2.tgz","fileCount":4,"unpackedSize":6842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc+U4MCRA9TVsSAnZWagAA71AP/2rpu0zYdK5Z/BXrrKNW\nljsVOs4oHNJ2jeZrzpcV8eZUZ6zAi78plyxcnMCbbG+TrpjXrPcb8qFq630G\nS6+srbEF0lCGCc+ktJrNJPTeXkDxukQXVrepgZ2kxZ4m3q/QIAVoK4t9ebuH\nNYa+39wwET9oPuPsk+YY0Z7fQ1vadyuzHYOrRmtudV3ZtyT0k74Ec3IhKamW\nlLDJtCklD7IGcwirrvPssxmYu8WP+PAyFnrVaOW+iior1o07oWO2mk7sk3Fx\nwBSBFf7vZqFJP6Qg1m3TVBAiipL+Pf+b3Dy8fhmn4NhTGj/9Wl7f/LcqogOV\nV9l77qsZldCERBwmwLsHlMyCSSl/b2qaz28ZBTRwHtHdo19QT6MqX8Yvomy4\n+gyPBBAHC6bqqLZ0veRKzSNFfJYoFw8tQzyjSjpmYcdxaB5w4z4QPZAkZCku\ns+sooI5Xo33E9rcEDWmyqxdUud+Au/fTttg0dReYe8NVrUgzyk4T1W+D7I4k\nu3XV7O9bOaJiBTNsb22lGIC6E/HtjfoqW7iwl0cdZ8iZcPTBClkzsy9Hz6a4\nmNKDARFL0wjzWF/CoXyKcI6t9ruOepTQRfbAtZDAo4LEYj/bGiqm2kbX5AP6\nicCOlufTNip74l2bXv2sJNwtjGzEYF/S79Oyc49IP/ovIua4quXXtSjAh8Bg\nLrV/\r\n=GrYx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVNTHsphMsdrWmzEq1T6dFGHe80Vg5ZmIWN1NIKOAHewIgE0sscC2rehxwM3V43Nil6I4auXhiwsdK9Kb1JtejdzE="}]},"maintainers":[{"email":"alexandro@phi.nz","name":"alexaltea"},{"email":"ana.trajkovska2015@gmail.com","name":"anatrajkovska"},{"email":"artzbitz@gmail.com","name":"andybitz"},{"email":"arunoda.susiripala@gmail.com","name":"arunoda"},{"email":"franco@basement.studio","name":"arzafran"},{"email":"atcastle@gmail.com","name":"atcastle"},{"email":"ciao@sylin.me","name":"b3nnyl"},{"email":"caarlos0@gmail.com","name":"caarlos0"},{"email":"thecodetheory@gmail.com","name":"codetheory"},{"email":"allenhai03@gmail.com","name":"coetry"},{"email":"mail@connordav.is","name":"dav-is"},{"email":"fivepointseven@icloud.com","name":"fivepointseven"},{"email":"guybedford@gmail.com","name":"guybedford"},{"email":"hharnisc@gmail.com","name":"hharnisc"},{"email":"lukas@huvar.cz","name":"huvik"},{"email":"hello@evilrabb.it","name":"iamevilrabbit"},{"email":"igor@klopov.com","name":"igorklopov"},{"email":"jj@jjsweb.site","name":"ijjk"},{"email":"janicklasralph036@gmail.com","name":"janicklas-ralph"},{"email":"javier.velasco86@gmail.com","name":"javivelasco"},{"email":"joecohenr@gmail.com","name":"joecohens"},{"email":"juancampa@gmail.com","name":"juancampa"},{"email":"leo@zeit.co","name":"leo"},{"email":"luisito453@gmail.com","name":"lfades"},{"email":"luc.leray@gmail.com","name":"lucleray"},{"email":"manovotny@gmail.com","name":"manovotny"},{"email":"marcosnils@gmail.com","name":"marcosnils"},{"email":"me@matheus.top","name":"matheuss"},{"email":"mrfix84@gmail.com","name":"mfix22"},{"email":"mark.glagola@gmail.com","name":"mglagola"},{"email":"mail@msweeneydev.com","name":"msweeneydev"},{"email":"naoyuki.kanezawa@gmail.com","name":"nkzawa"},{"email":"olli@zeit.co","name":"olliv"},{"email":"pvco.coursey@gmail.com","name":"paco"},{"email":"paulogdemitri@gmail.com","name":"paulogdm"},{"email":"ds303077135@gmail.com","name":"quietshu"},{"email":"rabautse@gmail.com","name":"rabaut"},{"email":"ragojosefrancisco@gmail.com","name":"ragojose"},{"email":"rauchg@gmail.com","name":"rauchg"},{"email":"sbanskota08@gmail.com","name":"sarupbanskota"},{"email":"skllcrn@zeit.co","name":"skllcrn"},{"email":"t.sophearak@gmail.com","name":"sophearak"},{"email":"steven@ceriously.com","name":"styfle"},{"email":"timer150@gmail.com","name":"timer"},{"email":"tim@timneutkens.nl","name":"timneutkens"},{"email":"nathan@tootallnate.net","name":"tootallnate"},{"email":"iyatomi@gmail.com","name":"umegaya"},{"email":"williamli@bbi.io","name":"williamli"},{"email":"team@zeit.co","name":"zeit-bot"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ms_2.1.2_1559842315767_0.4700607530567853"},"_hasShrinkwrap":false},"2.1.3":{"name":"ms","version":"2.1.3","description":"Tiny millisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/vercel/ms.git"},"main":"./index","scripts":{"precommit":"lint-staged","lint":"eslint lib/* bin/*","test":"mocha tests.js"},"eslintConfig":{"extends":"eslint:recommended","env":{"node":true,"es6":true}},"lint-staged":{"*.js":["npm run lint","prettier --single-quote --write","git add"]},"license":"MIT","devDependencies":{"eslint":"4.18.2","expect.js":"0.3.1","husky":"0.14.3","lint-staged":"5.0.0","mocha":"4.0.1","prettier":"2.0.5"},"gitHead":"1c6264b795492e8fdecbc82cb8802fcfbfc08d26","bugs":{"url":"https://github.com/vercel/ms/issues"},"homepage":"https://github.com/vercel/ms#readme","_id":"ms@2.1.3","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==","shasum":"574c8138ce1d2b5861f0b44579dbadd60c6615b2","tarball":"http://localhost:4260/ms/ms-2.1.3.tgz","fileCount":4,"unpackedSize":6721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz4WbCRA9TVsSAnZWagAA5A8P/jNowbVOl1ORENKivAXb\nQ3NncrkWHdRjUGeUhX89Ih3N+woNugnSTOEKACswARtqXMf5M1Iy8GODorDp\noz+pqU0HGU+KjLO/sL+TGxJJJAMfX3vhRZTHk5ZzKDi9s6iAM3nMeE5rwNUS\n7wprOzbKNE9hev82zLgfY8kF7UhxY09BH/GBS+kWGD3ViM8R5vl49JEfrvN9\nSKris0FTSP/YL1QrRNjvMMfGh9WhMOC/FLkJnIErcw2I8g/XmBOApjqM9KhG\n42/ls4gXuaUinNXC68wAbntxhHtJo2403NVmU7UJDDdulEBbTXZ18cKHt520\nUkRZp8piQb1m3QR8XPjvpnShlOutYdQJfjltY5z12Wfwj5OBVsurWeFtJRme\nBxn9pdrKW45doypT1Lc7LXoIftLBtToVtWRThEVihq4I9f4zpR9Uzc3qp1jU\nlEo9ndqf9rg9oVV8fSK+dIDuUUyp7NrI5uCfcUMfKEgwWortapNKNvMuHp7r\noZhuGRekRc1kG8YmsYfLKv3kRS8uiXa/jbwD4PkNGbev7KhEptCnGZm78z9k\nV0KOdaCU3Igo6rK23kgsAFhxDvMANHby3dLYQMbZOoqkZLv4qiPS/7raPOLc\n5q/ezwT2JZLWZlTbZnigAVuZ5aHmLb6QEuMLcIQaelDkH7XWCNpED8cM2pFX\nTllW\r\n=eZCP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpp8dz4QhYMwrrNgFARRXozR4wAyDcUVNXEBw0PmSj+wIhALlCZH2KJyCo9qv/3CfMFsvx9bXKQNQBOqmLstIPXP2L"}]},"_npmUser":{"name":"styfle","email":"steven@ceriously.com"},"directories":{},"maintainers":[{"name":"elsigh","email":"lsimon@commoner.com"},{"name":"leerobinson","email":"lrobinson2011@gmail.com"},{"name":"hankvercel","email":"hank@vercel.com"},{"name":"okbel","email":"belen@vercel.com"},{"name":"samsisle","email":"samko9522@gmail.com"},{"name":"cleishm","email":"chris@leishman.org"},{"name":"nazarenooviedo","email":"nazareno@basement.studio"},{"name":"chibicode","email":"shu@chibicode.com"},{"name":"gielcobben","email":"g.cobben@gmail.com"},{"name":"jaredpalmer","email":"jared@palmer.net"},{"name":"jkrems","email":"jan.krems@gmail.com"},{"name":"prateekbh","email":"prateek89born@gmail.com"},{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},{"name":"gmonaco","email":"gbmonaco@google.com"},{"name":"housseindjirdeh","email":"houssein.djirdeh@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"spanicker","email":"shubhie@gmail.com"},{"name":"keanulee","email":"npm@keanulee.com"},{"name":"atcastle","email":"atcastle@gmail.com"},{"name":"janicklas-ralph","email":"janicklasralph036@gmail.com"},{"name":"skllcrn","email":"skllcrn@zeit.co"},{"name":"paco","email":"pvco.coursey@gmail.com"},{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"ragojose","email":"ragojosefrancisco@gmail.com"},{"name":"williamli","email":"williamli@bbi.io"},{"name":"msweeneydev","email":"mail@msweeneydev.com"},{"name":"coetry","email":"allenhai03@gmail.com"},{"name":"rabaut","email":"rabautse@gmail.com"},{"name":"lfades","email":"luisito453@gmail.com"},{"name":"mfix22","email":"mrfix84@gmail.com"},{"name":"ijjk","email":"jj@jjsweb.site"},{"name":"arzafran","email":"franco@basement.studio"},{"name":"umegaya","email":"iyatomi@gmail.com"},{"name":"timer","email":"timer150@gmail.com"},{"name":"anatrajkovska","email":"ana.trajkovska2015@gmail.com"},{"name":"paulogdm","email":"paulogdemitri@gmail.com"},{"name":"andybitz","email":"artzbitz@gmail.com"},{"name":"mglagola","email":"mark.glagola@gmail.com"},{"name":"lucleray","email":"luc.leray@gmail.com"},{"name":"zeit-bot","email":"team@zeit.co"},{"name":"styfle","email":"steven@ceriously.com"},{"name":"juancampa","email":"juancampa@gmail.com"},{"name":"dav-is","email":"mail@connordav.is"},{"name":"quietshu","email":"ds303077135@gmail.com"},{"name":"joecohens","email":"joecohenr@gmail.com"},{"name":"codetheory","email":"thecodetheory@gmail.com"},{"name":"matheuss","email":"matheus.frndes@gmail.com"},{"name":"igorklopov","email":"igor@klopov.com"},{"name":"leo","email":"mindrun@icloud.com"},{"name":"nkzawa","email":"naoyuki.kanezawa@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"javivelasco","email":"javier.velasco86@gmail.com"},{"name":"iamevilrabbit","email":"hello@evilrabb.it"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ms_2.1.3_1607435675054_0.7617026089064693"},"_hasShrinkwrap":false},"3.0.0-beta.0":{"name":"ms","version":"3.0.0-beta.0","description":"Tiny millisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/vercel/ms.git"},"main":"./lib/index.cjs","type":"module","exports":{"import":"./lib/index.mjs","require":"./lib/index.cjs"},"module":"./lib/index.mjs","types":"./lib/index.d.ts","sideEffects":false,"license":"MIT","engines":{"node":">=12.13"},"scripts":{"test":"jest","build":"scripts/build.js","prepublishOnly":"npm run build","eslint-check":"eslint --max-warnings=0 .","prettier-check":"prettier --check .","type-check":"tsc --noEmit","precommit":"lint-staged","prepare":"husky install"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"prettier":{"endOfLine":"lf","tabWidth":2,"printWidth":80,"singleQuote":true,"trailingComma":"all"},"lint-staged":{"*":["prettier --ignore-unknown --write"],"*.{js,jsx,ts,tsx}":["eslint --max-warnings=0 --fix"]},"devDependencies":{"@types/jest":"27.0.1","@typescript-eslint/eslint-plugin":"4.29.2","@typescript-eslint/parser":"4.29.2","eslint":"7.32.0","eslint-config-prettier":"8.3.0","eslint-plugin-jest":"24.4.0","eslint-plugin-tsdoc":"0.2.14","husky":"7.0.1","jest":"27.0.6","lint-staged":"11.1.2","prettier":"2.3.2","ts-jest":"27.0.5","typescript":"4.3.5"},"gitHead":"4059199878427d37197270ee7852d7c18206e92a","readme":"# ms\n\n![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)\n\nUse this package to easily convert various time formats to milliseconds.\n\n## Examples\n\n<!-- prettier-ignore -->\n```js\nms('2 days') // 172800000\nms('1d') // 86400000\nms('10h') // 36000000\nms('2.5 hrs') // 9000000\nms('2h') // 7200000\nms('1m') // 60000\nms('5s') // 5000\nms('1y') // 31557600000\nms('100') // 100\nms('-3 days') // -259200000\nms('-1h') // -3600000\nms('-200') // -200\n```\n\n### Convert from Milliseconds\n\n<!-- prettier-ignore -->\n```js\nms(60000) // \"1m\"\nms(2 * 60000) // \"2m\"\nms(-3 * 60000) // \"-3m\"\nms(ms('10 hours')) // \"10h\"\n```\n\n### Time Format Written-Out\n\n<!-- prettier-ignore -->\n```js\nms(60000, { long: true }) // \"1 minute\"\nms(2 * 60000, { long: true }) // \"2 minutes\"\nms(-3 * 60000, { long: true }) // \"-3 minutes\"\nms(ms('10 hours'), { long: true }) // \"10 hours\"\n```\n\n## Features\n\n- Works both in [Node.js](https://nodejs.org) and in the browser\n- If a number is supplied to `ms`, a string with a unit is returned\n- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)\n- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned\n\n## TypeScript support\n\nAs of v3.0, this package includes TypeScript definitions.\n\nFor added safety, we're using [Template Literal Types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html) (added in [TypeScript 4.1](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html)). This ensures that you don't accidentally pass `ms` values that it can't process.\n\nThis won't require you to do anything special in most situations, but you can also import the `StringValue` type from `ms` if you need to use it.\n\n```ts\nimport ms, { StringValue } from 'ms';\n\n// Using the exported type.\nfunction example(value: StringValue) {\n ms(value);\n}\n\n// This function will only accept a string compatible with `ms`.\nexample('1 h');\n```\n\nIn this example, we use a [Type Assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions) to coerce a `string`.\n\n```ts\nimport ms, { StringValue } from 'ms';\n\n// Type assertion with the exported type.\nfunction example(value: string) {\n try {\n // A string could be \"wider\" than the values accepted by `ms`, so we assert\n // that our `value` is a `StringValue`.\n //\n // It's important to note that this can be dangerous (see below).\n ms(value as StringValue);\n } catch (error: Error) {\n // Handle any errors from invalid vaues.\n console.error(error);\n }\n}\n\n// This function will accept any string, which may result in a bug.\nexample('any value');\n```\n\nYou may also create a custom Template Literal Type.\n\n```ts\nimport ms from 'ms';\n\ntype OnlyDaysAndWeeks = `${number} ${'days' | 'weeks'}`;\n\n// Using a custom Template Literal Type.\nfunction example(value: OnlyDaysAndWeeks) {\n // The type of `value` is narrower than the values `ms` accepts, which is\n // safe to use without coercion.\n ms(value);\n}\n\n// This function will accept \"# days\" or \"# weeks\" only.\nexample('5.2 days');\n```\n\n## Related Packages\n\n- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.\n\n## Caught a Bug?\n\n1. [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\n2. Link the package to the global module directory: `npm link`\n3. 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!\n\nAs always, you can run the tests using: `npm test`\n","readmeFilename":"readme.md","bugs":{"url":"https://github.com/vercel/ms/issues"},"homepage":"https://github.com/vercel/ms#readme","_id":"ms@3.0.0-beta.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-x620WtkfdGJZPaGRIJLeTEJcHiq6fHx0DR2KVfMgn4bLB3N60NUFrTTfuo7mcNPc5coqyu0ioK5m92CXnJKYGQ==","shasum":"d970e06f8b1e384befe5acae5c27209e9b93916f","tarball":"http://localhost:4260/ms/ms-3.0.0-beta.0.tgz","fileCount":6,"unpackedSize":13619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhH8IPCRA9TVsSAnZWagAAg5UQAIbpkc8lAv6vhXdAdaG9\nB68gErEeCr23hE2FgK2h/p8FiSbFe9/7ypcroMZS7So+U5AORtaT62E44yOa\nxPQPpLZ+BlK7tzsrNZ7+R6MHQ9HLIKbAro0h0z/XOWzMSGRdWJ1oZ7oAWnK/\nqXluUHk/2qrRh9GnH01Ad1+Ji59bdrzVLG4fEqd1z9A53Uvy3FukX6aAvbic\npn6P7hqWsI+FGChjLlB57mGAtK1VazKSYjh4Y9rG5HY11D/pvXhcH+ca1ZJj\nYYijM6mcACB5HU/IJpqZoMYZMzlGTGhIVHjbm6GDs47d0aGPlnh5274737mo\nA5gzHabPeBj15ad3p2y7K7Lka6zxWkGsc69CRkE9LL6+fcCprynxqOD53Zg3\nmR1zU/druwYyOY2hrxseuqVKGOXyQN9Zz/SCC2jH+vltzY3hIOZ6GwfeyRQE\nHxIIfqpNFTruzDYQvVb48BlMWnHCXYJfrVdfQfBeVKuO0Nh/g297l1hKnj9n\n7ENP5kzi8wvaZBYfFYQaMTxT5FbgXL7h2sIdxD+8kj8o3G4saGXKDJNAJJA+\n/T1u9pRoCcnTvOdrq0A/76fJ1sxEyVMN3AMLDxOSwdpMNd7moWo7wZDZQNCr\n5Blg+qB/5Nm/FvywIgB9Lp0Al932k9xkWtOBQvD5LMvTKHNRkz//RrquxkK4\na/yk\r\n=vM3v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+jRNIkA56bvZw4h1rzaZ1SIiPaZEQeZb9o1gnY9G3KgIgP+ZTSGpNasc0hM4f2g8jhBrXzBG9/3qXFQ2TEDqCRwo="}]},"_npmUser":{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},"directories":{},"maintainers":[{"name":"redacted-vercel","email":"a@vercel.com"},{"name":"gkaragkiaouris","email":"gkaragkiaouris2@gmail.com"},{"name":"matheuss","email":"matheus.frndes@gmail.com"},{"name":"igorklopov","email":"igor@klopov.com"},{"name":"leo","email":"mindrun@icloud.com"},{"name":"nkzawa","email":"naoyuki.kanezawa@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"javivelasco","email":"javier.velasco86@gmail.com"},{"name":"iamevilrabbit","email":"hello@evilrabb.it"},{"name":"joecohens","email":"joecohenr@gmail.com"},{"name":"quietshu","email":"ds303077135@gmail.com"},{"name":"dav-is","email":"mail@connordav.is"},{"name":"styfle","email":"steven@ceriously.com"},{"name":"zeit-bot","email":"team@zeit.co"},{"name":"lucleray","email":"luc.leray@gmail.com"},{"name":"mglagola","email":"mark.glagola@gmail.com"},{"name":"andybitz","email":"artzbitz@gmail.com"},{"name":"paulogdm","email":"paulogdemitri@gmail.com"},{"name":"anatrajkovska","email":"ana.trajkovska2015@gmail.com"},{"name":"timer","email":"timer150@gmail.com"},{"name":"umegaya","email":"iyatomi@gmail.com"},{"name":"arzafran","email":"franco@studiofreight.com"},{"name":"ijjk","email":"jj@jjsweb.site"},{"name":"mfix22","email":"mrfix84@gmail.com"},{"name":"lfades","email":"luisito453@gmail.com"},{"name":"rabaut","email":"rabautse@gmail.com"},{"name":"coetry","email":"allenhai03@gmail.com"},{"name":"msweeneydev","email":"mail@mcs.dev"},{"name":"williamli","email":"william@bbi.studio"},{"name":"ragojose","email":"ragojosefrancisco@gmail.com"},{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"paco","email":"pvco.coursey@gmail.com"},{"name":"skllcrn","email":"skllcrn@zeit.co"},{"name":"janicklas-ralph","email":"janicklasralph036@gmail.com"},{"name":"atcastle","email":"atcastle@gmail.com"},{"name":"keanulee","email":"npm@keanulee.com"},{"name":"spanicker","email":"shubhie@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"housseindjirdeh","email":"houssein.djirdeh@gmail.com"},{"name":"gmonaco","email":"gbmonaco@google.com"},{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},{"name":"prateekbh","email":"prateek89born@gmail.com"},{"name":"jkrems","email":"jan.krems@gmail.com"},{"name":"jaredpalmer","email":"jared@palmer.net"},{"name":"gielcobben","email":"g.cobben@gmail.com"},{"name":"chibicode","email":"shu@chibicode.com"},{"name":"nazarenooviedo","email":"nazareno@basement.studio"},{"name":"samsisle","email":"samko9522@gmail.com"},{"name":"okbel","email":"curciobel@gmail.com"},{"name":"hankvercel","email":"hank@vercel.com"},{"name":"leerobinson","email":"lrobinson2011@gmail.com"},{"name":"elsigh","email":"lsimon@commoner.com"},{"name":"julianbenegas","email":"julianbenegas99@gmail.com"},{"name":"rizbizkits","email":"rizwana.akmal@hotmail.com"},{"name":"raunofreiberg","email":"freiberggg@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"cl3arglass","email":"haltaffer@gmail.com"},{"name":"chriswdmr","email":"github.wolle404@gmail.com"},{"name":"ernestd","email":"lapapelera@gmail.com"},{"name":"ismaelrumzan","email":"ismaelrumzan@gmail.com"},{"name":"jhoch","email":"jrshoch@gmail.com"},{"name":"mitchellwright","email":"mitchellbwright@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"kuvos","email":"npm-public@qfox.nl"},{"name":"creationix","email":"tim@creationix.com"},{"name":"aboodman","email":"aaron@aaronboodman.com"},{"name":"huozhi","email":"inbox@huozhi.im"},{"name":"cmvnk","email":"christina@vercel.com"},{"name":"arv","email":"erik.arvidsson@gmail.com"},{"name":"ktcarter","email":"ktcarter09@gmail.com"},{"name":"aspctub","email":"aspctub@gmail.com"},{"name":"padmaia","email":"dev@padmaia.rocks"},{"name":"delba","email":"delbabrown@gmail.com"},{"name":"catsaremlg","email":"joshuadgon@gmail.com"},{"name":"steventey","email":"stevensteel97@gmail.com"},{"name":"gsandhu","email":"gsandhu@csumb.edu"},{"name":"dbredvick","email":"dbredvick@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ms_3.0.0-beta.0_1629471246957_0.5534162813430621"},"_hasShrinkwrap":false},"3.0.0-beta.1":{"name":"ms","version":"3.0.0-beta.1","description":"Tiny millisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/vercel/ms.git"},"main":"./lib/index.cjs","type":"module","exports":{"import":"./lib/index.mjs","require":"./lib/index.cjs"},"module":"./lib/index.mjs","types":"./lib/index.d.ts","sideEffects":false,"license":"MIT","engines":{"node":">=12.13"},"scripts":{"test":"jest","build":"scripts/build.js","prepublishOnly":"npm run build","eslint-check":"eslint --max-warnings=0 .","prettier-check":"prettier --check .","type-check":"tsc --noEmit","precommit":"lint-staged","prepare":"husky install"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"prettier":{"endOfLine":"lf","tabWidth":2,"printWidth":80,"singleQuote":true,"trailingComma":"all"},"lint-staged":{"*":["prettier --ignore-unknown --write"],"*.{js,jsx,ts,tsx}":["eslint --max-warnings=0 --fix"]},"devDependencies":{"@types/jest":"27.0.1","@typescript-eslint/eslint-plugin":"4.29.2","@typescript-eslint/parser":"4.29.2","eslint":"7.32.0","eslint-config-prettier":"8.3.0","eslint-plugin-jest":"24.4.0","eslint-plugin-tsdoc":"0.2.14","husky":"7.0.1","jest":"27.0.6","lint-staged":"11.1.2","prettier":"2.3.2","ts-jest":"27.0.5","typescript":"4.3.5"},"readme":"# ms\n\n![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)\n\nUse this package to easily convert various time formats to milliseconds.\n\n## Examples\n\n<!-- prettier-ignore -->\n```js\nms('2 days') // 172800000\nms('1d') // 86400000\nms('10h') // 36000000\nms('2.5 hrs') // 9000000\nms('2h') // 7200000\nms('1m') // 60000\nms('5s') // 5000\nms('1y') // 31557600000\nms('100') // 100\nms('-3 days') // -259200000\nms('-1h') // -3600000\nms('-200') // -200\n```\n\n### Convert from Milliseconds\n\n<!-- prettier-ignore -->\n```js\nms(60000) // \"1m\"\nms(2 * 60000) // \"2m\"\nms(-3 * 60000) // \"-3m\"\nms(ms('10 hours')) // \"10h\"\n```\n\n### Time Format Written-Out\n\n<!-- prettier-ignore -->\n```js\nms(60000, { long: true }) // \"1 minute\"\nms(2 * 60000, { long: true }) // \"2 minutes\"\nms(-3 * 60000, { long: true }) // \"-3 minutes\"\nms(ms('10 hours'), { long: true }) // \"10 hours\"\n```\n\n## Features\n\n- Works both in [Node.js](https://nodejs.org) and in the browser\n- If a number is supplied to `ms`, a string with a unit is returned\n- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)\n- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned\n\n## TypeScript support\n\nAs of v3.0, this package includes TypeScript definitions.\n\nFor added safety, we're using [Template Literal Types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html) (added in [TypeScript 4.1](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html)). This ensures that you don't accidentally pass `ms` values that it can't process.\n\nThis won't require you to do anything special in most situations, but you can also import the `StringValue` type from `ms` if you need to use it.\n\n```ts\nimport ms, { StringValue } from 'ms';\n\n// Using the exported type.\nfunction example(value: StringValue) {\n ms(value);\n}\n\n// This function will only accept a string compatible with `ms`.\nexample('1 h');\n```\n\nIn this example, we use a [Type Assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions) to coerce a `string`.\n\n```ts\nimport ms, { StringValue } from 'ms';\n\n// Type assertion with the exported type.\nfunction example(value: string) {\n try {\n // A string could be \"wider\" than the values accepted by `ms`, so we assert\n // that our `value` is a `StringValue`.\n //\n // It's important to note that this can be dangerous (see below).\n ms(value as StringValue);\n } catch (error: Error) {\n // Handle any errors from invalid vaues.\n console.error(error);\n }\n}\n\n// This function will accept any string, which may result in a bug.\nexample('any value');\n```\n\nYou may also create a custom Template Literal Type.\n\n```ts\nimport ms from 'ms';\n\ntype OnlyDaysAndWeeks = `${number} ${'days' | 'weeks'}`;\n\n// Using a custom Template Literal Type.\nfunction example(value: OnlyDaysAndWeeks) {\n // The type of `value` is narrower than the values `ms` accepts, which is\n // safe to use without coercion.\n ms(value);\n}\n\n// This function will accept \"# days\" or \"# weeks\" only.\nexample('5.2 days');\n```\n\n## Related Packages\n\n- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.\n\n## Caught a Bug?\n\n1. [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\n2. Link the package to the global module directory: `npm link`\n3. 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!\n\nAs always, you can run the tests using: `npm test`\n","readmeFilename":"readme.md","gitHead":"7068bb390311b2620e65f992cd3ad6ff19d13400","bugs":{"url":"https://github.com/vercel/ms/issues"},"homepage":"https://github.com/vercel/ms#readme","_id":"ms@3.0.0-beta.1","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-72RBgCsIUfh6MtK1FyAqWVYjMhvYsU/5WbiTrAksNyIcv/uhR8r6g7wU5JEUIzhRYYI1uF9+I5S1vOb41NYxkw==","shasum":"1796d327b201d04705b8bf70b67442246c1e26e4","tarball":"http://localhost:4260/ms/ms-3.0.0-beta.1.tgz","fileCount":6,"unpackedSize":14348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhH8pPCRA9TVsSAnZWagAAGCwP/3DbSG2smcKeDj9lFBPU\nmpBf0EX+gm3YCCoz1ixYWF8TaIYRC6uFQFmxWP/7o+ag5B4wDQNLFh0kNlbi\ni8z+9fkUbKus6DKh8SUZgQNRm+NYNCel1KsjQtzxyIslB2EAGShYgSYTMsP7\nD6G2d5euZ+TPjyobhRY46N0NKtpeR3c6tI37/4I800LZyltoZYz6IHGz045l\nd3V5OcqdTQOSi/7AFd0Zc13HUOPqYmSJlW5wb9Txyn7Q3z7KviqjhwK0jCF1\nrCVGDwBJKnLwdy/SzcARY3axunoFEBe/tp8zriXtghNMrS/bfnLgG4HFWdSJ\n86cmCYpdKbgX0gg4tjBzq7XvsgtVbnYJqKIE+lZ9hawMJ/Z2+3JNXIQdQvQq\n4QiYjfRpDmEzhMsDxzc1AE+k4DqJzSvfMby40ZL6wWjYaxqYHmh+Hzs7AI9j\nHPwQqDGJjI8rIRJfIE3bforsqXKIYl0hhrX9EiGjQi4WTHYvKnHqwM1fu2IG\n81FvA3r3TlMAqElVjyTweA+aC8ZDo1rotEZ+o4GwHJdzq/o/Cl0TnywnvDbg\nQ7+0yUwUFhtvhG91ALA7+//88EtoZQWA/5pvAjhCmPW806Duj/gYph2rJusx\n2MCeY96ymM9vNPPP0jPaJ7clMcDJgxG9MDlBtQWS0saV9YSQJYs1sBBArjAK\n10TE\r\n=wU56\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9xLNQt+Wq9N34218VR3qSfJEMeQH+MAyMXdpB6TjWrAiA6fbt9dFUCnCu1ZEMCkEn5bH/iI4EhijfNqN11rXMnww=="}]},"_npmUser":{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},"directories":{},"maintainers":[{"name":"redacted-vercel","email":"a@vercel.com"},{"name":"gkaragkiaouris","email":"gkaragkiaouris2@gmail.com"},{"name":"matheuss","email":"matheus.frndes@gmail.com"},{"name":"igorklopov","email":"igor@klopov.com"},{"name":"leo","email":"mindrun@icloud.com"},{"name":"nkzawa","email":"naoyuki.kanezawa@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"javivelasco","email":"javier.velasco86@gmail.com"},{"name":"iamevilrabbit","email":"hello@evilrabb.it"},{"name":"joecohens","email":"joecohenr@gmail.com"},{"name":"quietshu","email":"ds303077135@gmail.com"},{"name":"dav-is","email":"mail@connordav.is"},{"name":"styfle","email":"steven@ceriously.com"},{"name":"zeit-bot","email":"team@zeit.co"},{"name":"lucleray","email":"luc.leray@gmail.com"},{"name":"mglagola","email":"mark.glagola@gmail.com"},{"name":"andybitz","email":"artzbitz@gmail.com"},{"name":"paulogdm","email":"paulogdemitri@gmail.com"},{"name":"anatrajkovska","email":"ana.trajkovska2015@gmail.com"},{"name":"timer","email":"timer150@gmail.com"},{"name":"umegaya","email":"iyatomi@gmail.com"},{"name":"arzafran","email":"franco@studiofreight.com"},{"name":"ijjk","email":"jj@jjsweb.site"},{"name":"mfix22","email":"mrfix84@gmail.com"},{"name":"lfades","email":"luisito453@gmail.com"},{"name":"rabaut","email":"rabautse@gmail.com"},{"name":"coetry","email":"allenhai03@gmail.com"},{"name":"msweeneydev","email":"mail@mcs.dev"},{"name":"williamli","email":"william@bbi.studio"},{"name":"ragojose","email":"ragojosefrancisco@gmail.com"},{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"paco","email":"pvco.coursey@gmail.com"},{"name":"skllcrn","email":"skllcrn@zeit.co"},{"name":"janicklas-ralph","email":"janicklasralph036@gmail.com"},{"name":"atcastle","email":"atcastle@gmail.com"},{"name":"keanulee","email":"npm@keanulee.com"},{"name":"spanicker","email":"shubhie@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"housseindjirdeh","email":"houssein.djirdeh@gmail.com"},{"name":"gmonaco","email":"gbmonaco@google.com"},{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},{"name":"prateekbh","email":"prateek89born@gmail.com"},{"name":"jkrems","email":"jan.krems@gmail.com"},{"name":"jaredpalmer","email":"jared@palmer.net"},{"name":"gielcobben","email":"g.cobben@gmail.com"},{"name":"chibicode","email":"shu@chibicode.com"},{"name":"nazarenooviedo","email":"nazareno@basement.studio"},{"name":"samsisle","email":"samko9522@gmail.com"},{"name":"okbel","email":"curciobel@gmail.com"},{"name":"hankvercel","email":"hank@vercel.com"},{"name":"leerobinson","email":"lrobinson2011@gmail.com"},{"name":"elsigh","email":"lsimon@commoner.com"},{"name":"julianbenegas","email":"julianbenegas99@gmail.com"},{"name":"rizbizkits","email":"rizwana.akmal@hotmail.com"},{"name":"raunofreiberg","email":"freiberggg@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"cl3arglass","email":"haltaffer@gmail.com"},{"name":"chriswdmr","email":"github.wolle404@gmail.com"},{"name":"ernestd","email":"lapapelera@gmail.com"},{"name":"ismaelrumzan","email":"ismaelrumzan@gmail.com"},{"name":"jhoch","email":"jrshoch@gmail.com"},{"name":"mitchellwright","email":"mitchellbwright@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"kuvos","email":"npm-public@qfox.nl"},{"name":"creationix","email":"tim@creationix.com"},{"name":"aboodman","email":"aaron@aaronboodman.com"},{"name":"huozhi","email":"inbox@huozhi.im"},{"name":"cmvnk","email":"christina@vercel.com"},{"name":"arv","email":"erik.arvidsson@gmail.com"},{"name":"ktcarter","email":"ktcarter09@gmail.com"},{"name":"aspctub","email":"aspctub@gmail.com"},{"name":"padmaia","email":"dev@padmaia.rocks"},{"name":"delba","email":"delbabrown@gmail.com"},{"name":"catsaremlg","email":"joshuadgon@gmail.com"},{"name":"steventey","email":"stevensteel97@gmail.com"},{"name":"gsandhu","email":"gsandhu@csumb.edu"},{"name":"dbredvick","email":"dbredvick@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ms_3.0.0-beta.1_1629473359666_0.4804227855905876"},"_hasShrinkwrap":false},"3.0.0-beta.2":{"name":"ms","version":"3.0.0-beta.2","description":"Tiny millisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/vercel/ms.git"},"main":"./lib/index.cjs","type":"module","exports":{"import":"./lib/index.mjs","require":"./lib/index.cjs"},"module":"./lib/index.mjs","types":"./lib/index.d.ts","sideEffects":false,"license":"MIT","engines":{"node":">=12.13"},"scripts":{"test":"jest","build":"scripts/build.js","prepublishOnly":"npm run build","eslint-check":"eslint --max-warnings=0 .","prettier-check":"prettier --check .","type-check":"tsc --noEmit","precommit":"lint-staged","prepare":"husky install"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"prettier":{"endOfLine":"lf","tabWidth":2,"printWidth":80,"singleQuote":true,"trailingComma":"all"},"lint-staged":{"*":["prettier --ignore-unknown --write"],"*.{js,jsx,ts,tsx}":["eslint --max-warnings=0 --fix"]},"devDependencies":{"@types/jest":"27.0.1","@typescript-eslint/eslint-plugin":"4.29.2","@typescript-eslint/parser":"4.29.2","eslint":"7.32.0","eslint-config-prettier":"8.3.0","eslint-plugin-jest":"24.4.0","eslint-plugin-tsdoc":"0.2.14","husky":"7.0.1","jest":"27.0.6","lint-staged":"11.1.2","prettier":"2.3.2","ts-jest":"27.0.5","typescript":"4.3.5"},"readme":"# ms\n\n![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)\n\nUse this package to easily convert various time formats to milliseconds.\n\n## Examples\n\n<!-- prettier-ignore -->\n```js\nms('2 days') // 172800000\nms('1d') // 86400000\nms('10h') // 36000000\nms('2.5 hrs') // 9000000\nms('2h') // 7200000\nms('1m') // 60000\nms('5s') // 5000\nms('1y') // 31557600000\nms('100') // 100\nms('-3 days') // -259200000\nms('-1h') // -3600000\nms('-200') // -200\n```\n\n### Convert from Milliseconds\n\n<!-- prettier-ignore -->\n```js\nms(60000) // \"1m\"\nms(2 * 60000) // \"2m\"\nms(-3 * 60000) // \"-3m\"\nms(ms('10 hours')) // \"10h\"\n```\n\n### Time Format Written-Out\n\n<!-- prettier-ignore -->\n```js\nms(60000, { long: true }) // \"1 minute\"\nms(2 * 60000, { long: true }) // \"2 minutes\"\nms(-3 * 60000, { long: true }) // \"-3 minutes\"\nms(ms('10 hours'), { long: true }) // \"10 hours\"\n```\n\n## Features\n\n- Works both in [Node.js](https://nodejs.org) and in the browser\n- If a number is supplied to `ms`, a string with a unit is returned\n- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)\n- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned\n\n## TypeScript support\n\nAs of v3.0, this package includes TypeScript definitions.\n\nFor added safety, we're using [Template Literal Types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html) (added in [TypeScript 4.1](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html)). This ensures that you don't accidentally pass `ms` values that it can't process.\n\nThis won't require you to do anything special in most situations, but you can also import the `StringValue` type from `ms` if you need to use it.\n\n```ts\nimport ms, { StringValue } from 'ms';\n\n// Using the exported type.\nfunction example(value: StringValue) {\n ms(value);\n}\n\n// This function will only accept a string compatible with `ms`.\nexample('1 h');\n```\n\nIn this example, we use a [Type Assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions) to coerce a `string`.\n\n```ts\nimport ms, { StringValue } from 'ms';\n\n// Type assertion with the exported type.\nfunction example(value: string) {\n try {\n // A string could be \"wider\" than the values accepted by `ms`, so we assert\n // that our `value` is a `StringValue`.\n //\n // It's important to note that this can be dangerous (see below).\n ms(value as StringValue);\n } catch (error: Error) {\n // Handle any errors from invalid vaues.\n console.error(error);\n }\n}\n\n// This function will accept any string, which may result in a bug.\nexample('any value');\n```\n\nYou may also create a custom Template Literal Type.\n\n```ts\nimport ms from 'ms';\n\ntype OnlyDaysAndWeeks = `${number} ${'days' | 'weeks'}`;\n\n// Using a custom Template Literal Type.\nfunction example(value: OnlyDaysAndWeeks) {\n // The type of `value` is narrower than the values `ms` accepts, which is\n // safe to use without coercion.\n ms(value);\n}\n\n// This function will accept \"# days\" or \"# weeks\" only.\nexample('5.2 days');\n```\n\n## Related Packages\n\n- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.\n\n## Caught a Bug?\n\n1. [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\n2. Link the package to the global module directory: `npm link`\n3. 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!\n\nAs always, you can run the tests using: `npm test`\n","readmeFilename":"readme.md","gitHead":"6d2221735dbe9ec197e0753c22af4ce406ac512b","bugs":{"url":"https://github.com/vercel/ms/issues"},"homepage":"https://github.com/vercel/ms#readme","_id":"ms@3.0.0-beta.2","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-G/4X0GjOFFpeGVj0D/yxd7plnMjizeLa2mBu2yNRPQlDlvmERfqZ2alTIijo9QNH91b9g1IlJAYsVV1g6GbWvg==","shasum":"c1a586879b489759c44be2ac402ff1df7c314ed9","tarball":"http://localhost:4260/ms/ms-3.0.0-beta.2.tgz","fileCount":6,"unpackedSize":14286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJnYECRA9TVsSAnZWagAA8LAP/jr9VE4KB/K4xCmdrgkG\nZOrWFvAMO0Wu1TZXBEgt0SnCBKXP5jFN0IJggJSmEMfEmsrwkgdId9nk0ys/\nEP7jUr0RficCQOQTU2uizTPnhOMrq8bfrNiXjnMHpGZC1eMPCGb31pzSb2VO\nKjHuUACp98wf84+VCYt9YADukcCg80wNT4+9rksEob2AGOf4KfwDae7zLeDt\nqs37qJ3gUDHZ7KthRdbBiBVKlUqlUW4MYKtFg+BecZ+gF6xeQv3GCEnNSMV6\n0Hqi1YE9psDv7dTHYEEG9yH/W3kq6ebQM/QeaSEATOAXuPhb2U84eVuOHbYJ\n6XAUKWGeQ0rilGVMuJ81anRdp3nlogiABou3hMieqSMiuVFYFajhhdQdUmLO\niHyBKMeY9+5z3rGG0styw4xp0EZcUcRNOGtniHVyHMvCwDiw9kIihhVFyLEe\n63F5u3Q8kQ+IYYZhZyZGDODoBcy8nD7LVmEAFQmIobqdPOR5PLg+RjzxXWYD\nLwQ9OBmB6UIjLVVNKvbhG+TF7gf5ENUgx9q4LA7ewyydbQ8CsbQyckzU+ARS\nm1Y/9Un7pjxExBp0h1P6yCJLf15U8v2S6XrFB7tBiLXxluO21SWNAonf2eo/\nemhpixBmFsVyObD9a9qVI6EKww6Kpad9WF6mungV8DhJ1mWalFHHbED7xDr3\nXNyR\r\n=nwPo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1hBJF3CyIp43qz+NutYJQROKQx4EJrU27T+WPDAVO9AIgLOgW7rV1gAQx5LTNjsPyNTUVoncio7Cm79Bqjc4tp+4="}]},"_npmUser":{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},"directories":{},"maintainers":[{"name":"geovanisouza92","email":"geovanisouza92@gmail.com"},{"name":"dglsparsons","email":"dglsparsons@gmail.com"},{"name":"redacted-vercel","email":"a@vercel.com"},{"name":"gkaragkiaouris","email":"gkaragkiaouris2@gmail.com"},{"name":"matheuss","email":"matheus.frndes@gmail.com"},{"name":"igorklopov","email":"igor@klopov.com"},{"name":"leo","email":"mindrun@icloud.com"},{"name":"nkzawa","email":"naoyuki.kanezawa@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"javivelasco","email":"javier.velasco86@gmail.com"},{"name":"iamevilrabbit","email":"hello@evilrabb.it"},{"name":"joecohens","email":"joecohenr@gmail.com"},{"name":"quietshu","email":"ds303077135@gmail.com"},{"name":"dav-is","email":"mail@connordav.is"},{"name":"styfle","email":"steven@ceriously.com"},{"name":"zeit-bot","email":"team@zeit.co"},{"name":"lucleray","email":"luc.leray@gmail.com"},{"name":"mglagola","email":"mark.glagola@gmail.com"},{"name":"andybitz","email":"artzbitz@gmail.com"},{"name":"paulogdm","email":"paulogdemitri@gmail.com"},{"name":"anatrajkovska","email":"ana.trajkovska2015@gmail.com"},{"name":"timer","email":"timer150@gmail.com"},{"name":"umegaya","email":"iyatomi@gmail.com"},{"name":"arzafran","email":"franco@studiofreight.com"},{"name":"ijjk","email":"jj@jjsweb.site"},{"name":"mfix22","email":"mrfix84@gmail.com"},{"name":"lfades","email":"luisito453@gmail.com"},{"name":"rabaut","email":"rabautse@gmail.com"},{"name":"coetry","email":"allenhai03@gmail.com"},{"name":"msweeneydev","email":"mail@mcs.dev"},{"name":"williamli","email":"william@bbi.studio"},{"name":"ragojose","email":"ragojosefrancisco@gmail.com"},{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"paco","email":"pvco.coursey@gmail.com"},{"name":"skllcrn","email":"skllcrn@zeit.co"},{"name":"janicklas-ralph","email":"janicklasralph036@gmail.com"},{"name":"atcastle","email":"atcastle@gmail.com"},{"name":"keanulee","email":"npm@keanulee.com"},{"name":"spanicker","email":"shubhie@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"housseindjirdeh","email":"houssein.djirdeh@gmail.com"},{"name":"gmonaco","email":"gbmonaco@google.com"},{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},{"name":"prateekbh","email":"prateek89born@gmail.com"},{"name":"jkrems","email":"jan.krems@gmail.com"},{"name":"jaredpalmer","email":"jared@palmer.net"},{"name":"gielcobben","email":"g.cobben@gmail.com"},{"name":"chibicode","email":"shu@chibicode.com"},{"name":"nazarenooviedo","email":"nazareno@basement.studio"},{"name":"samsisle","email":"samko9522@gmail.com"},{"name":"okbel","email":"curciobel@gmail.com"},{"name":"hankvercel","email":"hank@vercel.com"},{"name":"leerobinson","email":"lrobinson2011@gmail.com"},{"name":"elsigh","email":"lsimon@commoner.com"},{"name":"julianbenegas","email":"julianbenegas99@gmail.com"},{"name":"rizbizkits","email":"rizwana.akmal@hotmail.com"},{"name":"raunofreiberg","email":"freiberggg@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"cl3arglass","email":"haltaffer@gmail.com"},{"name":"chriswdmr","email":"github.wolle404@gmail.com"},{"name":"ernestd","email":"lapapelera@gmail.com"},{"name":"ismaelrumzan","email":"ismaelrumzan@gmail.com"},{"name":"jhoch","email":"jrshoch@gmail.com"},{"name":"mitchellwright","email":"mitchellbwright@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"kuvos","email":"npm-public@qfox.nl"},{"name":"creationix","email":"tim@creationix.com"},{"name":"aboodman","email":"aaron@aaronboodman.com"},{"name":"huozhi","email":"inbox@huozhi.im"},{"name":"cmvnk","email":"christina@vercel.com"},{"name":"arv","email":"erik.arvidsson@gmail.com"},{"name":"ktcarter","email":"ktcarter09@gmail.com"},{"name":"padmaia","email":"dev@padmaia.rocks"},{"name":"delba","email":"delbabrown@gmail.com"},{"name":"catsaremlg","email":"joshuadgon@gmail.com"},{"name":"steventey","email":"stevensteel97@gmail.com"},{"name":"gsandhu","email":"gsandhu@csumb.edu"},{"name":"dbredvick","email":"dbredvick@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ms_3.0.0-beta.2_1629910532683_0.9012556075786939"},"_hasShrinkwrap":false},"3.0.0-canary.0":{"name":"ms","version":"3.0.0-canary.0","description":"Tiny millisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/vercel/ms.git"},"main":"./dist/index.cjs","type":"module","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"module":"./dist/index.mjs","types":"./dist/index.d.ts","sideEffects":false,"license":"MIT","engines":{"node":">=12.13"},"scripts":{"test":"jest","build":"scripts/build.js","prepublishOnly":"npm run build","eslint-check":"eslint --max-warnings=0 .","prettier-check":"prettier --check .","type-check":"tsc --noEmit","precommit":"lint-staged","prepare":"husky install"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"prettier":{"endOfLine":"lf","tabWidth":2,"printWidth":80,"singleQuote":true,"trailingComma":"all"},"lint-staged":{"*":["prettier --ignore-unknown --write"],"*.{js,jsx,ts,tsx}":["eslint --max-warnings=0 --fix"]},"devDependencies":{"@types/jest":"27.0.1","@typescript-eslint/eslint-plugin":"4.31.0","@typescript-eslint/parser":"4.31.0","eslint":"7.32.0","eslint-config-prettier":"8.3.0","eslint-plugin-jest":"24.4.0","eslint-plugin-tsdoc":"0.2.14","husky":"7.0.2","jest":"27.1.1","lint-staged":"11.1.2","prettier":"2.4.0","ts-jest":"27.0.5","typescript":"4.4.2"},"gitHead":"6dd3b72e9b0a920d5ca04b989390ce89b12f62bd","bugs":{"url":"https://github.com/vercel/ms/issues"},"homepage":"https://github.com/vercel/ms#readme","_id":"ms@3.0.0-canary.0","_nodeVersion":"14.16.0","_npmVersion":"7.23.0","dist":{"integrity":"sha512-FrdRKJ9G+nm9Bw6atUMrbIhGTJ2emtf0KRgtzgSrAW1nnV9RuQAXc7sbFWdr1RfOH3fcNk0MyK+ma4iihdLmyA==","shasum":"f965adb7f3afccac672ec0b2cf6bdc5320b755c5","tarball":"http://localhost:4260/ms/ms-3.0.0-canary.0.tgz","fileCount":3,"unpackedSize":6502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQfUcCRA9TVsSAnZWagAAQcsP/iMuelcMKc3N/pGuuY6u\nwIFV0jvr8Eg34xc+7wB0Udatyc0gGRbUtfLbjp7dpAfgRahYEyoC5g3FR+5p\nP1MnSz6pUpDJmUyTwFvrOzK7qcOaJ2GhVPZfwAlxOMBZZgHnwV8kxaGFtzfp\nnF3bm88rpdGP39euQZ+nmqF6GbLk75w+n/hcZR7Cn8/Td/cCPEZml2jRRAzD\nXatLIMpQwt/zmp1tYwTyfedfL8jbiG8cCZhIoFcSxKUzzUxNHY7DEwkxSGaw\nhK7kuf9HhFuhIJ5TCt/2JiVVNk5UbnqECY9XmQ7AZe3iaYRBKDVGtdnlhiZf\nsYZJ1zEYF0gu7GKzrJ+V7fJQhq54GDATOqrVshkY0C4hUbwlle2s4GdtzhaH\n7Tcg/I0vh7vrzCHBxq29STEkwIXGEjlwZNjcodliHqMDBa58xmr9EADCpohD\niW5Hj+2uU7Ck3Kq1NA/+1PM1rnh8ggwOox/990XyCaTyHPGoiHIbGus/aNz2\n6OJuUMYPGEEFUxTYJDu/donxBjhgpBo2cPoa0duDohrkoXDWZAMq4ru6PBUz\nlKBm2zgLrbhx3RjjcbXfJUutU7bqk684+7TsjQSXMr2vp5DfB6UekivBn7E/\nwqMDJyAw5YI13mLWkywaHRlgnQaare2gnrpcentKrwkjT04D8K31yV0YFL+T\nl+PD\r\n=v81M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG9fP6snzEazBzbtwGebA39rR56jidykhpdO8FFQ4sR/AiEAxFhwnZyHkBJ0/RWH+qTfKSQBmWWVmxQnMyaVtXekPCE="}]},"_npmUser":{"name":"leerobinson","email":"lrobinson2011@gmail.com"},"directories":{},"maintainers":[{"name":"lostinpatterns","email":"blweiner@gmail.com"},{"name":"vercel-release-bot","email":"infra+release@vercel.com"},{"name":"geovanisouza92","email":"geovanisouza92@gmail.com"},{"name":"dglsparsons","email":"dglsparsons@gmail.com"},{"name":"redacted-vercel","email":"a@vercel.com"},{"name":"gkaragkiaouris","email":"gkaragkiaouris2@gmail.com"},{"name":"matheuss","email":"matheus.frndes@gmail.com"},{"name":"igorklopov","email":"igor@klopov.com"},{"name":"leo","email":"mindrun@icloud.com"},{"name":"nkzawa","email":"naoyuki.kanezawa@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"javivelasco","email":"javier.velasco86@gmail.com"},{"name":"iamevilrabbit","email":"hello@evilrabb.it"},{"name":"joecohens","email":"joecohenr@gmail.com"},{"name":"quietshu","email":"ds303077135@gmail.com"},{"name":"dav-is","email":"mail@connordav.is"},{"name":"styfle","email":"steven@ceriously.com"},{"name":"zeit-bot","email":"team@zeit.co"},{"name":"lucleray","email":"luc.leray@gmail.com"},{"name":"mglagola","email":"mark.glagola@gmail.com"},{"name":"andybitz","email":"artzbitz@gmail.com"},{"name":"paulogdm","email":"paulogdemitri@gmail.com"},{"name":"anatrajkovska","email":"ana.trajkovska2015@gmail.com"},{"name":"timer","email":"timer150@gmail.com"},{"name":"umegaya","email":"iyatomi@gmail.com"},{"name":"arzafran","email":"franco@studiofreight.com"},{"name":"ijjk","email":"jj@jjsweb.site"},{"name":"mfix22","email":"mrfix84@gmail.com"},{"name":"lfades","email":"luisito453@gmail.com"},{"name":"rabaut","email":"rabautse@gmail.com"},{"name":"coetry","email":"allenhai03@gmail.com"},{"name":"msweeneydev","email":"mail@mcs.dev"},{"name":"williamli","email":"william@bbi.studio"},{"name":"ragojose","email":"ragojosefrancisco@gmail.com"},{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"paco","email":"pvco.coursey@gmail.com"},{"name":"skllcrn","email":"skllcrn@zeit.co"},{"name":"janicklas-ralph","email":"janicklasralph036@gmail.com"},{"name":"atcastle","email":"atcastle@gmail.com"},{"name":"keanulee","email":"npm@keanulee.com"},{"name":"spanicker","email":"shubhie@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"housseindjirdeh","email":"houssein.djirdeh@gmail.com"},{"name":"gmonaco","email":"gbmonaco@google.com"},{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},{"name":"prateekbh","email":"prateek89born@gmail.com"},{"name":"jkrems","email":"jan.krems@gmail.com"},{"name":"jaredpalmer","email":"jared@palmer.net"},{"name":"gielcobben","email":"g.cobben@gmail.com"},{"name":"chibicode","email":"shu@chibicode.com"},{"name":"nazarenooviedo","email":"nazareno@basement.studio"},{"name":"samsisle","email":"samko9522@gmail.com"},{"name":"okbel","email":"curciobel@gmail.com"},{"name":"hankvercel","email":"hank@vercel.com"},{"name":"leerobinson","email":"lrobinson2011@gmail.com"},{"name":"elsigh","email":"lsimon@commoner.com"},{"name":"julianbenegas","email":"julianbenegas99@gmail.com"},{"name":"rizbizkits","email":"rizwana.akmal@hotmail.com"},{"name":"raunofreiberg","email":"freiberggg@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"cl3arglass","email":"haltaffer@gmail.com"},{"name":"chriswdmr","email":"github.wolle404@gmail.com"},{"name":"ernestd","email":"lapapelera@gmail.com"},{"name":"ismaelrumzan","email":"ismaelrumzan@gmail.com"},{"name":"jhoch","email":"jrshoch@gmail.com"},{"name":"mitchellwright","email":"mitchellbwright@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"kuvos","email":"npm-public@qfox.nl"},{"name":"creationix","email":"tim@creationix.com"},{"name":"aboodman","email":"aaron@aaronboodman.com"},{"name":"huozhi","email":"inbox@huozhi.im"},{"name":"cmvnk","email":"christina@vercel.com"},{"name":"arv","email":"erik.arvidsson@gmail.com"},{"name":"ktcarter","email":"ktcarter09@gmail.com"},{"name":"padmaia","email":"dev@padmaia.rocks"},{"name":"delba","email":"delbabrown@gmail.com"},{"name":"catsaremlg","email":"joshuadgon@gmail.com"},{"name":"steventey","email":"stevensteel97@gmail.com"},{"name":"gsandhu","email":"gsandhu@csumb.edu"},{"name":"dbredvick","email":"dbredvick@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ms_3.0.0-canary.0_1631712540574_0.010946113352426678"},"_hasShrinkwrap":false},"3.0.0-canary.1":{"name":"ms","version":"3.0.0-canary.1","description":"Tiny millisecond conversion utility","repository":{"type":"git","url":"git+https://github.com/vercel/ms.git"},"main":"./dist/index.cjs","type":"module","exports":{"import":"./dist/index.mjs","require":"./dist/index.cjs"},"module":"./dist/index.mjs","types":"./dist/index.d.ts","sideEffects":false,"license":"MIT","engines":{"node":">=12.13"},"scripts":{"test":"jest","build":"scripts/build.js","prepublishOnly":"npm run build","eslint-check":"eslint --max-warnings=0 .","prettier-check":"prettier --check .","type-check":"tsc --noEmit","precommit":"lint-staged","prepare":"husky install"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"prettier":{"endOfLine":"lf","tabWidth":2,"printWidth":80,"singleQuote":true,"trailingComma":"all"},"lint-staged":{"*":["prettier --ignore-unknown --write"],"*.{js,jsx,ts,tsx}":["eslint --max-warnings=0 --fix"]},"devDependencies":{"@types/jest":"27.0.1","@typescript-eslint/eslint-plugin":"4.31.0","@typescript-eslint/parser":"4.31.0","eslint":"7.32.0","eslint-config-prettier":"8.3.0","eslint-plugin-jest":"24.4.0","eslint-plugin-tsdoc":"0.2.14","husky":"7.0.2","jest":"27.1.1","lint-staged":"11.1.2","prettier":"2.4.0","ts-jest":"27.0.5","typescript":"4.4.2"},"gitHead":"1304f150b38027e0818cc122106b5c7322d68d0c","bugs":{"url":"https://github.com/vercel/ms/issues"},"homepage":"https://github.com/vercel/ms#readme","_id":"ms@3.0.0-canary.1","_nodeVersion":"14.16.0","_npmVersion":"7.23.0","dist":{"integrity":"sha512-kh8ARjh8rMN7Du2igDRO9QJnqCb2xYTJxyQYK7vJJS4TvLLmsbyhiKpSW+t+y26gyOyMd0riphX0GeWKU3ky5g==","shasum":"c7b34fbce381492fd0b345d1cf56e14d67b77b80","tarball":"http://localhost:4260/ms/ms-3.0.0-canary.1.tgz","fileCount":6,"unpackedSize":14294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQhP7CRA9TVsSAnZWagAAS20P/1TYMFK4KBMo9NC82jk1\n+ZHpdsPG2bz+huqFkQphBtoYRZva5A/8KFcRofaMYRUEkyfP7u3EEhLthjIZ\nwTgcmcZ/iVFjvOxKNOZWyEXt6gs4HoVkK3Tq+mEwhrO6/dkPneID9XZP3fzL\nY/b2IBVsUkmwHtdkebH93psNAr34fW0+54rOEFpjCxI7Dq59za+5Yf4exmgx\nTMAaTPttWxlgfzUV3Z7/KQpZoe8/jTkneyxBFnmzk0ItTEl9tdX/EuZOp4/E\nOKG+nHYRT+42Ku/9l1t0IWhWRIUuyVn3GogapxAtYlVsYhljVf1jW3oTsx5H\n4c3Qikhgt1XSQrl6DgR/7jWg0z6Hyw+cm9agd0uvgyxuO7+ryO/RVo1+6E7T\nt/SqI5XK5qFLYvy/gOT90P2Xez5pfOWfTE9eJ8TQDkuNVFWMRVtTgIP5cKVP\nNJEENjthusiOc+4aPneNMeGLbgLXQEu89YQnuTHr597hF47MmtN5GYVgZ1BF\nW/WoNBwjouEPKUELXrVEk1i15IlDZlVbZUgtiP+3DChpvOTzCdaeHukagQIQ\nohl34zyBhqAlcVbWtSY1Kx7UwgDKTE74Wzx0E5JHX4HO3YDNlz2Zy54tnuR6\nQfKTzTrrcmXY+KRD1S3IY5sXToYbngX5O7jQRdOu/Rq9zJ2UGz3XpxRIGL64\nZeWp\r\n=JrQO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHBNEug7mB/RfCh7+qYSJ76i3rlL5OdUVtD0d5t3XnKAIgIWO/BOxIA0pVwJBJTsOoDtZjphznmwWADAwFq6853vk="}]},"_npmUser":{"name":"leerobinson","email":"lrobinson2011@gmail.com"},"directories":{},"maintainers":[{"name":"lostinpatterns","email":"blweiner@gmail.com"},{"name":"vercel-release-bot","email":"infra+release@vercel.com"},{"name":"geovanisouza92","email":"geovanisouza92@gmail.com"},{"name":"dglsparsons","email":"dglsparsons@gmail.com"},{"name":"redacted-vercel","email":"a@vercel.com"},{"name":"gkaragkiaouris","email":"gkaragkiaouris2@gmail.com"},{"name":"matheuss","email":"matheus.frndes@gmail.com"},{"name":"igorklopov","email":"igor@klopov.com"},{"name":"leo","email":"mindrun@icloud.com"},{"name":"nkzawa","email":"naoyuki.kanezawa@gmail.com"},{"name":"tootallnate","email":"nathan@tootallnate.net"},{"name":"rauchg","email":"rauchg@gmail.com"},{"name":"timneutkens","email":"tim@timneutkens.nl"},{"name":"javivelasco","email":"javier.velasco86@gmail.com"},{"name":"iamevilrabbit","email":"hello@evilrabb.it"},{"name":"joecohens","email":"joecohenr@gmail.com"},{"name":"quietshu","email":"ds303077135@gmail.com"},{"name":"dav-is","email":"mail@connordav.is"},{"name":"styfle","email":"steven@ceriously.com"},{"name":"zeit-bot","email":"team@zeit.co"},{"name":"lucleray","email":"luc.leray@gmail.com"},{"name":"mglagola","email":"mark.glagola@gmail.com"},{"name":"andybitz","email":"artzbitz@gmail.com"},{"name":"paulogdm","email":"paulogdemitri@gmail.com"},{"name":"anatrajkovska","email":"ana.trajkovska2015@gmail.com"},{"name":"timer","email":"timer150@gmail.com"},{"name":"umegaya","email":"iyatomi@gmail.com"},{"name":"arzafran","email":"franco@studiofreight.com"},{"name":"ijjk","email":"jj@jjsweb.site"},{"name":"mfix22","email":"mrfix84@gmail.com"},{"name":"lfades","email":"luisito453@gmail.com"},{"name":"rabaut","email":"rabautse@gmail.com"},{"name":"coetry","email":"allenhai03@gmail.com"},{"name":"msweeneydev","email":"mail@mcs.dev"},{"name":"williamli","email":"william@bbi.studio"},{"name":"ragojose","email":"ragojosefrancisco@gmail.com"},{"name":"guybedford","email":"guybedford@gmail.com"},{"name":"paco","email":"pvco.coursey@gmail.com"},{"name":"skllcrn","email":"skllcrn@zeit.co"},{"name":"janicklas-ralph","email":"janicklasralph036@gmail.com"},{"name":"atcastle","email":"atcastle@gmail.com"},{"name":"keanulee","email":"npm@keanulee.com"},{"name":"spanicker","email":"shubhie@gmail.com"},{"name":"developit","email":"jason@developit.ca"},{"name":"housseindjirdeh","email":"houssein.djirdeh@gmail.com"},{"name":"gmonaco","email":"gbmonaco@google.com"},{"name":"kikobeats","email":"josefrancisco.verdu@gmail.com"},{"name":"prateekbh","email":"prateek89born@gmail.com"},{"name":"jkrems","email":"jan.krems@gmail.com"},{"name":"jaredpalmer","email":"jared@palmer.net"},{"name":"gielcobben","email":"g.cobben@gmail.com"},{"name":"chibicode","email":"shu@chibicode.com"},{"name":"nazarenooviedo","email":"nazareno@basement.studio"},{"name":"samsisle","email":"samko9522@gmail.com"},{"name":"okbel","email":"curciobel@gmail.com"},{"name":"hankvercel","email":"hank@vercel.com"},{"name":"leerobinson","email":"lrobinson2011@gmail.com"},{"name":"elsigh","email":"lsimon@commoner.com"},{"name":"julianbenegas","email":"julianbenegas99@gmail.com"},{"name":"rizbizkits","email":"rizwana.akmal@hotmail.com"},{"name":"raunofreiberg","email":"freiberggg@gmail.com"},{"name":"sokra","email":"tobias.koppers@googlemail.com"},{"name":"cl3arglass","email":"haltaffer@gmail.com"},{"name":"chriswdmr","email":"github.wolle404@gmail.com"},{"name":"ernestd","email":"lapapelera@gmail.com"},{"name":"ismaelrumzan","email":"ismaelrumzan@gmail.com"},{"name":"jhoch","email":"jrshoch@gmail.com"},{"name":"mitchellwright","email":"mitchellbwright@gmail.com"},{"name":"mrmckeb","email":"mrmckeb.npm@outlook.com"},{"name":"kuvos","email":"npm-public@qfox.nl"},{"name":"creationix","email":"tim@creationix.com"},{"name":"aboodman","email":"aaron@aaronboodman.com"},{"name":"huozhi","email":"inbox@huozhi.im"},{"name":"cmvnk","email":"christina@vercel.com"},{"name":"arv","email":"erik.arvidsson@gmail.com"},{"name":"ktcarter","email":"ktcarter09@gmail.com"},{"name":"padmaia","email":"dev@padmaia.rocks"},{"name":"delba","email":"delbabrown@gmail.com"},{"name":"catsaremlg","email":"joshuadgon@gmail.com"},{"name":"steventey","email":"stevensteel97@gmail.com"},{"name":"gsandhu","email":"gsandhu@csumb.edu"},{"name":"dbredvick","email":"dbredvick@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ms_3.0.0-canary.1_1631720443773_0.6805463476444127"},"_hasShrinkwrap":false}},"readme":"# ms\n\n![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)\n\nUse this package to easily convert various time formats to milliseconds.\n\n## Examples\n\n<!-- prettier-ignore -->\n```js\nms('2 days') // 172800000\nms('1d') // 86400000\nms('10h') // 36000000\nms('2.5 hrs') // 9000000\nms('2h') // 7200000\nms('1m') // 60000\nms('5s') // 5000\nms('1y') // 31557600000\nms('100') // 100\nms('-3 days') // -259200000\nms('-1h') // -3600000\nms('-200') // -200\n```\n\n### Convert from Milliseconds\n\n<!-- prettier-ignore -->\n```js\nms(60000) // \"1m\"\nms(2 * 60000) // \"2m\"\nms(-3 * 60000) // \"-3m\"\nms(ms('10 hours')) // \"10h\"\n```\n\n### Time Format Written-Out\n\n<!-- prettier-ignore -->\n```js\nms(60000, { long: true }) // \"1 minute\"\nms(2 * 60000, { long: true }) // \"2 minutes\"\nms(-3 * 60000, { long: true }) // \"-3 minutes\"\nms(ms('10 hours'), { long: true }) // \"10 hours\"\n```\n\n## Features\n\n- Works both in [Node.js](https://nodejs.org) and in the browser\n- If a number is supplied to `ms`, a string with a unit is returned\n- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)\n- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned\n\n## TypeScript support\n\nAs of v3.0, this package includes TypeScript definitions.\n\nFor added safety, we're using [Template Literal Types](https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html) (added in [TypeScript 4.1](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-1.html)). This ensures that you don't accidentally pass `ms` values that it can't process.\n\nThis won't require you to do anything special in most situations, but you can also import the `StringValue` type from `ms` if you need to use it.\n\n```ts\nimport ms, { StringValue } from 'ms';\n\n// Using the exported type.\nfunction example(value: StringValue) {\n ms(value);\n}\n\n// This function will only accept a string compatible with `ms`.\nexample('1 h');\n```\n\nIn this example, we use a [Type Assertion](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#type-assertions) to coerce a `string`.\n\n```ts\nimport ms, { StringValue } from 'ms';\n\n// Type assertion with the exported type.\nfunction example(value: string) {\n try {\n // A string could be \"wider\" than the values accepted by `ms`, so we assert\n // that our `value` is a `StringValue`.\n //\n // It's important to note that this can be dangerous (see below).\n ms(value as StringValue);\n } catch (error: Error) {\n // Handle any errors from invalid vaues.\n console.error(error);\n }\n}\n\n// This function will accept any string, which may result in a bug.\nexample('any value');\n```\n\nYou may also create a custom Template Literal Type.\n\n```ts\nimport ms from 'ms';\n\ntype OnlyDaysAndWeeks = `${number} ${'days' | 'weeks'}`;\n\n// Using a custom Template Literal Type.\nfunction example(value: OnlyDaysAndWeeks) {\n // The type of `value` is narrower than the values `ms` accepts, which is\n // safe to use without coercion.\n ms(value);\n}\n\n// This function will accept \"# days\" or \"# weeks\" only.\nexample('5.2 days');\n```\n\n## Related Packages\n\n- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.\n\n## Caught a Bug?\n\n1. [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\n2. Link the package to the global module directory: `npm link`\n3. 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!\n\nAs always, you can run the tests using: `npm test`\n","maintainers":[{"email":"gdborton@gmail.com","name":"gdborton"},{"email":"matheus.frndes@gmail.com","name":"matheuss"},{"email":"rauchg@gmail.com","name":"rauchg"},{"email":"matt.j.straka@gmail.com","name":"matt.straka"},{"email":"nick.tracey@vercel.com","name":"nick.tracey"},{"email":"team@zeit.co","name":"zeit-bot"},{"email":"infra+release@vercel.com","name":"vercel-release-bot"},{"email":"mindrun@icloud.com","name":"leo"}],"time":{"modified":"2024-02-12T16:09:13.910Z","created":"2011-12-21T19:38:08.664Z","0.1.0":"2011-12-21T19:38:26.538Z","0.2.0":"2012-09-03T20:33:06.093Z","0.3.0":"2012-09-07T20:36:45.931Z","0.4.0":"2012-10-22T17:01:26.046Z","0.5.0":"2012-11-10T00:39:49.944Z","0.5.1":"2013-02-24T20:27:27.010Z","0.6.0":"2013-03-15T15:26:35.127Z","0.6.1":"2013-05-10T15:38:08.059Z","0.6.2":"2013-12-05T15:57:45.292Z","0.7.0":"2014-11-24T07:59:08.195Z","0.7.1":"2015-04-20T23:38:57.957Z","0.7.2":"2016-10-25T08:16:49.773Z","0.7.3":"2017-03-08T21:59:28.048Z","1.0.0":"2017-03-19T21:43:15.128Z","2.0.0":"2017-05-16T12:26:06.610Z","2.1.0":"2017-11-30T16:54:16.315Z","2.1.1":"2017-11-30T18:30:16.876Z","2.1.2":"2019-06-06T17:31:55.859Z","2.1.3":"2020-12-08T13:54:35.223Z","3.0.0-beta.0":"2021-08-20T14:54:07.095Z","3.0.0-beta.1":"2021-08-20T15:29:19.828Z","3.0.0-beta.2":"2021-08-25T16:55:32.842Z","3.0.0-canary.0":"2021-09-15T13:29:00.734Z","3.0.0-canary.1":"2021-09-15T15:40:43.956Z"},"users":{"285858315":true,"dodo":true,"aaron":true,"pid":true,"hughsk":true,"eknkc":true,"forbeslindesay":true,"tur-nr":true,"humantriangle":true,"yasinaydin":true,"silas":true,"tunnckocore":true,"coderaiser":true,"fgribreau":true,"awaterma":true,"robermac":true,"subso":true,"rdcl":true,"dimd13":true,"stretchgz":true,"battlemidget":true,"pensierinmusica":true,"mcortesi":true,"pandao":true,"cshao":true,"intuitivcloud":true,"bapinney":true,"dac2205":true,"jerrywu":true,"crazyorr":true,"jesusgoku":true,"wangnan0610":true,"algonzo":true,"detj":true,"sedge":true,"hugojosefson":true,"spanser":true,"danielbankhead":true,"princetoad":true,"shanewholloway":true,"snowdream":true,"shlomi":true,"xieranmaya":true,"francisbrito":true,"andreaspizsa":true,"largepuma":true,"isaacvitor":true,"manikantag":true,"cbetancourt":true,"zoomyzoom":true,"ash":true,"neo1":true,"michalskuza":true,"writeosahon":true,"rocket0191":true,"lestad":true,"mojaray2k":true,"jondotsoy":true,"ahsanshafiq":true,"miguhruiz":true,"seangenabe":true,"mikestaub":true,"panlw":true,"hugovila":true,"dpjayasekara":true,"yatsu":true,"abhisekp":true,"daizch":true,"jondashkyle":true,"lichangwei":true,"xinwangwang":true,"ssljivic":true,"terrychan":true,"l3au":true,"brend":true,"nisimjoseph":true,"raycharles":true,"travis346":true,"nalindak":true,"usex":true,"hitalos":true,"machinabio":true,"h0ward":true,"larrychen":true,"anhulife":true,"shuoshubao":true,"shushanfx":true,"ahmedelgabri":true,"edwardxyt":true,"danieljameskay":true,"monkeyyy11":true,"bhaskarmelkani":true,"gtopia":true,"ccastelli":true,"mjurincic":true,"ganeshkbhat":true,"dexfs":true,"rajiff":true,"roccomuso":true,"hayathuk":true,"parkerproject":true,"xgheaven":true,"zhenguo.zhao":true,"hearsid":true,"kamikadze4game":true,"chrisx":true,"cr8tiv":true,"gerst20051":true,"losymear":true,"zuojiang":true,"xiechao06":true,"huiyifyj":true,"yuler":true,"dgmike":true,"myjustify":true,"flumpus-dev":true},"repository":{"type":"git","url":"git+https://github.com/vercel/ms.git"},"bugs":{"url":"https://github.com/vercel/ms/issues"},"readmeFilename":"readme.md","homepage":"https://github.com/vercel/ms#readme","license":"MIT"} |