{"_id":"@cjser/sindresorhus__to-milliseconds","name":"@cjser/sindresorhus__to-milliseconds","dist-tags":{"latest":"2.0.0-cjser.2"},"versions":{"2.0.0-cjser.2":{"name":"@cjser/sindresorhus__to-milliseconds","version":"2.0.0-cjser.2","description":"Convert an object of time properties to milliseconds: `{seconds: 2}` → `2000`","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"require":"./dist-cjser/index.cjs","default":"./index.js"},"engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["parse","object","properties","to","into","time","ms","milliseconds","microseconds","nanoseconds","duration","period","range","interval"],"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.39.1"},"main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"2.0.0","cjserVersion":2,"original":{"name":"@sindresorhus/to-milliseconds","version":"2.0.0","exports":"./index.js","repository":"sindresorhus/to-milliseconds","files":["index.js","index.d.ts"],"scripts":{"test":"xo && ava && tsd"}}},"_id":"@cjser/sindresorhus__to-milliseconds@2.0.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-n9vWpxb0M/TwEqNBspIVyqsjn3qYrAqdQyncmrE9B0o4mtojx7hAv1LCt/d69E9PltRLwk7++pHMin8tml6YzA==","shasum":"5e9c5f974dcd3d88bef7cbe55f074c9caa2f8ed8","tarball":"https://registry.npmjs.org/@cjser/sindresorhus__to-milliseconds/-/sindresorhus__to-milliseconds-2.0.0-cjser.2.tgz","fileCount":6,"unpackedSize":6914,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH5ZHzx7W+ZCAIRV/J1wkxDyrn8reNQYn/AfF9wriEfWAiEA9YkrFQmjIAnR0RTBbIcWs8WTABIk94PHUnq2pV6en6w="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sindresorhus__to-milliseconds_2.0.0-cjser.2_1778160021728_0.9728455713416035"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T13:20:21.619Z","2.0.0-cjser.2":"2026-05-07T13:20:21.875Z","modified":"2026-05-07T13:20:22.117Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Convert an object of time properties to milliseconds: `{seconds: 2}` → `2000`","keywords":["parse","object","properties","to","into","time","ms","milliseconds","microseconds","nanoseconds","duration","period","range","interval"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# to-milliseconds\n\n> Convert an object of time properties to milliseconds: `{seconds: 2}` → `2000`\n\n## Install\n\n```\n$ npm install @sindresorhus/to-milliseconds\n```\n\n## Usage\n\n```js\nimport toMilliseconds from '@sindresorhus/to-milliseconds';\n\ntoMilliseconds({\n\tdays: 15,\n\thours: 11,\n\tminutes: 23,\n\tseconds: 20,\n\tmilliseconds: 1\n});\n//=> 1337000001\n\nsetTimeout(() => {\n\t// …\n}, toMilliseconds({minutes: 2}));\n```\n\n## API\n\n### toMilliseconds(timeDescriptor)\n\n#### timeDescriptor\n\nType: `object`\n\nSpecify an object with any of the following properties:\n\n- `days`\n- `hours`\n- `minutes`\n- `seconds`\n- `milliseconds`\n- `microseconds`\n- `nanoseconds`\n\n## Related\n\n- [parse-ms](https://github.com/sindresorhus/parse-ms) - The inverse of this module\n- [pretty-ms](https://github.com/sindresorhus/pretty-ms) - Convert milliseconds to a human readable string\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/to-milliseconds\n","readmeFilename":"readme.md","_rev":"1-432dae9b805c23ef40ff799f646d78bf"}