{"_id":"f-duration","_rev":"2-acdc5dfe54409eb46cdd9fdc5cd8283b","name":"f-duration","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"f-duration","description":"Convert a number in milliseconds to a standard duration string.","version":"1.0.0","main":"build/duration.js","types":"build/duration.d.ts","author":{"name":"Mhammed Talhaouy","email":"tal7aouy@gmail.com"},"keywords":["display","duration","format","hh:mm:ss","hours","milliseconds","mm:ss","seconds","time"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/tal7aouy/f-duration.git"},"bugs":{"url":"https://github.com/tal7aouy/f-duration/issues"},"homepage":"https://github.com/tal7aouy/f-duration#readme","scripts":{"build":"tsc","test":"jest","test:coverage":"jest --coverage","lint":"eslint . --ext .ts --fix","prepublishOnly":"npm run build"},"devDependencies":{"@types/jest":"^27.4.0","@typescript-eslint/eslint-plugin":"^5.16.0","@typescript-eslint/parser":"^5.16.0","eslint":"^8.7.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.4.7","prettier":"^2.5.1","standard":"^16.0.4","tape":"^5.5.2","ts-jest":"^27.1.3","ts-node":"^10.4.0","typescript":"^4.5.4"},"_id":"f-duration@1.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-mxDtUIOVA8jpL3HQ3sLASyUAaq0KjYQOOwwzT+sTIa9VC3+9DHaDkXm98FVKK2Ejxty0P8uUj4cmuM/lA1O0Vw==","shasum":"b39c9a1f43fa92e15b48fabb52790831fe38fb31","tarball":"https://registry.npmjs.org/f-duration/-/f-duration-1.0.0.tgz","fileCount":18,"unpackedSize":17932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiP377ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmphPxAAiIpeQYaSiqECgl1lWciMJr5GUZUtGVGeTVCRMiHG2c0Uawat\r\n6Mk1dIUKE4Lxrq3X+1QaL6sjW9KP4LdDhMjEOMFkkBu1JoHVi+3OrHkaBtXH\r\nSbw9gssrclyVhgw/4VfRuG0Jq+Cv++OvSWi1u0oZFMTvLUF7+WCyEw7srDBs\r\nXnBTIEQ/qQmkKhb3f9C3QHst0hqSaQzs32HYFXX7vho30amdXExv6MhYKCH1\r\nqy5tId9frjYEHTt44RG+Q0k+Qc4M9L6uhY4ywRjDrclj9X8jbFnMqDl1QzTi\r\nDQGMol5lHFWTRnjI32meSzw8jreB2yc1Wd5IPAssSNg7fN++eaqmf5gEwUPK\r\nImtC8CKmusyfvDYGJq1s8gxXpouZLy3E1P7o8+Q2nvl7fdW7VSm891RGChqR\r\nDDCCeWKNVHyeLbPpIEbSKc3geCLKdreRW9EPIZqUPyEJbiqEA33+xtmwut2u\r\nZ69S1j2PkDWfN9kiWYirhe9vBmvKe2l7fhCvSutrIXRXF031JjeFkg94ulSv\r\n68qP46T5sW4J+Qu7RSSc3otCmQ5JouQ1s4qfmVfyiwVw+kA7jko9THkU4xwO\r\nYhIpP4d1IoOxY72+59tXNH8wM+PpZ+D6bh9AyS34VTCzspbuDOpz3e8pAaCq\r\n5BWcnmYxstZvyUJTgIvGsGGPXndlHNKGqMg=\r\n=RgQf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDr15foFoj77uNiVS8ichtbGwWn8+45kHYiRDLO21HhpAiEA3q9lkH/TmilucU+zOQ9PigEUfUVTTcd6/rkTKyqGJq8="}]},"_npmUser":{"name":"tal7aouy","email":"tal7aouy@gmail.com"},"directories":{},"maintainers":[{"name":"tal7aouy","email":"tal7aouy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/f-duration_1.0.0_1648328443593_0.9317387330353912"},"_hasShrinkwrap":false},"1.0.1":{"name":"f-duration","description":"Convert a number in milliseconds to a standard duration string.","version":"1.0.1","main":"build/duration.js","types":"build/duration.d.ts","author":{"name":"Mhammed Talhaouy","email":"tal7aouy@gmail.com"},"keywords":["display","duration","format","hh:mm:ss","hours","milliseconds","mm:ss","seconds","time"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/tal7aouy/f-duration.git"},"bugs":{"url":"https://github.com/tal7aouy/f-duration/issues"},"homepage":"https://github.com/tal7aouy/f-duration#readme","scripts":{"build":"tsc","test":"jest","test:coverage":"jest --coverage","lint":"eslint . --ext .ts --fix","prepublishOnly":"npm run build"},"devDependencies":{"@types/jest":"^27.4.0","@typescript-eslint/eslint-plugin":"^5.16.0","@typescript-eslint/parser":"^5.16.0","eslint":"^8.7.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0","jest":"^27.4.7","prettier":"^2.5.1","standard":"^16.0.4","tape":"^5.5.2","ts-jest":"^27.1.3","ts-node":"^10.4.0","typescript":"^4.5.4"},"_id":"f-duration@1.0.1","_nodeVersion":"16.14.2","_npmVersion":"8.5.5","dist":{"integrity":"sha512-FGpDu8I5QAaSLxf5Ypld3fG1bOZXrZQw+mqLWvaJX2MEaTNXJFO5OrtgSzVCKsOXBPnEXyZyi9mFTYru9HLcSw==","shasum":"5def38c39b62b078b249747e62a20e5deb1eb5c1","tarball":"https://registry.npmjs.org/f-duration/-/f-duration-1.0.1.tgz","fileCount":18,"unpackedSize":17936,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiP4E6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqV5g/8D6bkfCb4QlB2ew6khnPnj8uzarzuPE8wsqEg5Ucz6+eAd8Wr\r\nhTBhonz6AbOm23nB/b3ap9fPFixkyTkWgq3eTzf26BpJjlLGBs06zIib+OK1\r\n41dpCfZL/bLoRFaJylHUr+Y6GadelOpOfwGahmdh3arN6MxyzVsj3TE/ebqx\r\nwKfsEcH+2NwGpxwbSZVwTUe5c2r83PR26X2MhQgublV30qXgxEelUJ42DhDA\r\najW8fvB0u9u7rCrRM035hrqlWGQjollGreKoRJ4HnoFwTroO42FASuwy/CTY\r\nVajtfHsEGx379Bw6lQpKZ2bErH/1FSxJWYNJTmI/nGUWzpyCXa3lhRaEe+gZ\r\n+4TZM5qpfUiAPRQAYR63YHGL/EdnHjd1dg+w9NmcWNBW1ViJFssRtvpxxLmz\r\n7QRhBO6mx+sbg9j/HUX5eWxou7vOO09yRjKQkuAmMesI6Fqx8jPLSuiT0vnY\r\nLnXD/lkHR/OTKGzBEJ7oHMHTl3/sTHA5yyz1U9HvJTU0ocwaEiFoBaVcgqLK\r\nivPznMk8cXcEeVRhGvaYe4CtOK9zqjO50dZJ0Nb3HWzjPg/My4QspNNBzaCZ\r\nFiTZhoEiCZryzMS2hoH/LVhRIlLGlt4HVsT4guWJg+ZTwouVwm1hhvxp75fc\r\ncg0FHn8oHe8d2e7RdeS5D/XTs0JveX4BSp8=\r\n=pQna\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuuhP9wKSK5SSl4cDUiqrYWRqVAs4z5SDxKQKtPEJ6iQIhAOwA/N/uBbq0SKmbOjrfcFMnhyvMV5Smi/9DscBuhQl8"}]},"_npmUser":{"name":"tal7aouy","email":"tal7aouy@gmail.com"},"directories":{},"maintainers":[{"name":"tal7aouy","email":"tal7aouy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/f-duration_1.0.1_1648329017844_0.48761893122152333"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-26T21:00:43.592Z","1.0.0":"2022-03-26T21:00:43.915Z","modified":"2022-05-02T01:57:03.481Z","1.0.1":"2022-03-26T21:10:18.023Z"},"maintainers":[{"name":"tal7aouy","email":"tal7aouy@gmail.com"}],"description":"Convert a number in milliseconds to a standard duration string.","homepage":"https://github.com/tal7aouy/f-duration#readme","keywords":["display","duration","format","hh:mm:ss","hours","milliseconds","mm:ss","seconds","time"],"repository":{"type":"git","url":"git+https://github.com/tal7aouy/f-duration.git"},"author":{"name":"Mhammed Talhaouy","email":"tal7aouy@gmail.com"},"bugs":{"url":"https://github.com/tal7aouy/f-duration/issues"},"license":"MIT","readme":"Convert a number in milliseconds to a standard duration string.\n\n| Input :disappointed:  | Value :joy:    |\n| --------------------- | -------------- |\n| `999`                 | `'0:00'`       |\n| `1000 * 60`           | `'1:00'`       |\n| `1000 * 60 * 60`      | `'1:00:00'`    |\n| `1000 * 60 * 60 * 24` | `'1:00:00:00'` |\n\n## Install\n\nGet it on [npm](https://www.npmjs.com/package/f-duration)\n\n```bash\nnpm install f-duration\n```\n\nGet it on [yarn](https://yarnpkg.com/package/f-duration)\n\n```bash\nyarn add  f-duration\n```\n\n## Usage\n\n```js\nimport format from 'f-duration'\nformat(ms: number, options?: IOption)\n```\n\n```js\nimport format from 'f-duration'\n\n// anything under a second is rounded down to zero\nformat(999) // '0:00'\n\n// 1000 milliseconds is a second\nformat(1000) // '0:01'\n\n// 1999 rounds down to 0:01\nformat(1000 * 2 - 1) // '0:01'\n\n// 60 seconds is a minute\nformat(1000 * 60) // '1:00'\n\n// 59 seconds looks like this\nformat(1000 * 60 - 1) // '0:59'\n\n// 60 minutes is an hour\nformat(1000 * 60 * 60) // '1:00:00'\n\n// 59 minutes and 59 seconds looks like this\nformat(1000 * 60 * 60 - 1) // '59:59'\n\n// 24 hours is a day\nformat(1000 * 60 * 60 * 24) // '1:00:00:00'\n\n// 23 hours, 59 minutes, and 59 seconds looks like this\nformat(1000 * 60 * 60 * 24 - 1) // '23:59:59'\n\n// 365 days looks like this (not bothering with years)\nformat(1000 * 60 * 60 * 24 * 365) // '365:00:00:00'\n\n// anything under a second is rounded down to zero\nformat(-999) // '0:00'\n\n// 1000 milliseconds is a second\nformat(-1000) // '-0:01'\n\n// 365 days looks like this (not bothering with years)\nformat(-1000 * 60 * 60 * 24 * 365) // '-365:00:00:00'\n\n// with `leading` option, formatting looks like this\nformat(1000 * 60, { leading: true }) // '01:00'\nformat(1000 * 60 - 1, { leading: true }) // '00:59'\nformat(1000 * 60 * 60, { leading: true }) // '01:00:00'\n```\n\n## Default Options\n\n| Name      | Type      | Default | Description                                                             |\n| --------- | --------- | ------- | ----------------------------------------------------------------------- |\n| `leading` | `boolean` | `false` | leading zero eg:(format(1000,{leading:true})) (00:01) instead of (0:01) |\n\n---\n\n## License\n\n[MIT License](LICENSE)\n","readmeFilename":"README.md"}