{"_id":"ts-duration","_rev":"3-3be6b34be6a3e9361a29dd271c31f346","name":"ts-duration","dist-tags":{"latest":"1.1.0"},"versions":{"0.0.1":{"name":"ts-duration","version":"0.0.1","description":"Type safe duration representation","main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","author":{"name":"Alexander Håkansson","email":"alex.hsson@gmail.com","url":"https://hsson.dev"},"repository":{"type":"git","url":"git+https://github.com/hsson/ts-duration.git"},"keywords":["time","duration"],"scripts":{"test":"npm run lint && jest src --coverage --collectCoverageFrom 'src/**/*.ts' --passWithNoTests","lint":"eslint . --ext .ts --ignorcleare-pattern dist","lint:fix":"eslint . --ext .ts --ignore-pattern dist --fix","clean":"rm -rf ./dist/","compile":"npm run clean; tsc --build tsconfig.build.json","prepare":"npm run compile"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^14.11.2","@typescript-eslint/eslint-plugin":"^4.15.1","@typescript-eslint/parser":"^4.15.1","eslint":"^7.20.0","eslint-config-prettier":"^7.2.0","eslint-plugin-jest":"^24.3.1","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.3.1","jest":"^27.0.6","pre-commit":"^1.2.2","prettier":"^2.2.1","ts-jest":"^27.0.5","typescript":"^4.1.5"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"gitHead":"b02a039f8007969e92487e2c505bf5b115a70687","bugs":{"url":"https://github.com/hsson/ts-duration/issues"},"homepage":"https://github.com/hsson/ts-duration#readme","_id":"ts-duration@0.0.1","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-4qe7s5eZpD+v76xqjxMCv1tRIb6PoWyKGRR/M86bdEHAdFtaE1KCDt3pcUYKDNXH+08A2X81NhhP23K5jnU7VQ==","shasum":"245fade5f2ca90f04d6f3fb6be3a73221dde5ad1","tarball":"https://registry.npmjs.org/ts-duration/-/ts-duration-0.0.1.tgz","fileCount":16,"unpackedSize":18624,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHm0PCRA9TVsSAnZWagAAQNoQAKBXMV6f9S0WqgIX4yX6\nhCH88w4tidvYQYCjDotwiKmitw9I9K+tfDcDDVLTonHKgo8sfnKlVhxHQtKf\nko9tWoIo3iGMcICesET5CGcC+aM1/l9cZyLPAmxeQZmdkPOQxHi/eDMEBWCu\nYTyAHyGWKFW3H/9GqWKpMDgQXGjZ6lBOLfpZFv6fEb7OIisncF59RRtUbmWz\nwsWc7cH5x0qZWkxOckk6KUPXxnna/q20hoUixufy/4MzU1U5h2dbxZagQ0ab\nDJDmTSoQdMGcUT+16ZmTudh9DoqMpLyexvig7W/cCTWPZ2H/sFZMr78lZnLU\nJJrXf7GF8JKFGDSKfjI+nrSY0Dg7F4LA8wbBZSgYIwXqOgvq84eWlTTDiLJo\nuqujm6GeCCTXwApmrzhzxFKE5uZQ+BBJaEqmmF8VSC1kWfkJkPDz7hdedABn\nSIk/s2cjqZuuMvAIYFUUMuCfCRNgcPwIUwGvUI1uNUtHBcVT21vS8UeDqfCW\nXQ5mL5ZFUUOe/BR5w8UwJzrnYCCBKnwg51q/k3JMdEHu8uLLAQaOXwHaaDwH\n/uCFFJY63OsrtxBolVebbI56KppnTpXCUBTjGnpwZ0lM8o2IvUiY5eU9lx29\nL5Pi7UyKOQvcsRcE+sRJHmkt2Vcj84daXHUyq51ZLr7lEIz1lrQajJRZvP3g\nMrsF\r\n=m3aF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpEuPWy5JmfmYtInmdrVag5ybMibmpnTt+jXaHq84gnQIgB9fUVClvbZm7oYBowAt0xbIx9Ofd8Kr6/G1AxZ3o3fY="}]},"_npmUser":{"name":"hsson","email":"alex.hsson@gmail.com"},"directories":{},"maintainers":[{"name":"hsson","email":"alex.hsson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-duration_0.0.1_1629383951779_0.1421970087970157"},"_hasShrinkwrap":false},"1.0.0":{"name":"ts-duration","version":"1.0.0","description":"Type safe duration representation","main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","author":{"name":"Alexander Håkansson","email":"alex.hsson@gmail.com","url":"https://hsson.dev"},"repository":{"type":"git","url":"git+https://github.com/hsson/ts-duration.git"},"keywords":["time","duration"],"scripts":{"test":"npm run lint && jest src --coverage --collectCoverageFrom 'src/**/*.ts' --passWithNoTests","lint":"eslint . --ext .ts --ignore-pattern dist","lint:fix":"eslint . --ext .ts --ignore-pattern dist --fix","clean":"rm -rf ./dist/","compile":"npm run clean; tsc --build tsconfig.build.json","prepare":"npm run compile"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^14.11.2","@typescript-eslint/eslint-plugin":"^4.15.1","@typescript-eslint/parser":"^4.15.1","eslint":"^7.20.0","eslint-config-prettier":"^7.2.0","eslint-plugin-jest":"^24.3.1","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.3.1","jest":"^27.0.6","pre-commit":"^1.2.2","prettier":"^2.2.1","ts-jest":"^27.0.5","typescript":"^4.1.5"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"gitHead":"122c7522e29658fcf3d5c490013de1e9aec49983","bugs":{"url":"https://github.com/hsson/ts-duration/issues"},"homepage":"https://github.com/hsson/ts-duration#readme","_id":"ts-duration@1.0.0","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Eg8cgV2tJ4kcDyfNu/1N34sMNFlxP52BtZNW79jRiVEtw+4cH/PYwD8WilpRUpmz1HgmKyor8BauSdbLryNB6w==","shasum":"3a1e0a43a76212313ece1e91fb28ce2aa9006bae","tarball":"https://registry.npmjs.org/ts-duration/-/ts-duration-1.0.0.tgz","fileCount":16,"unpackedSize":18910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHnF2CRA9TVsSAnZWagAAoZIQAJ2UkN4mhd7iLalSovFJ\nP4W4FOWwqrLQmmivQ7AWf6umeITTNPJP/P3ieh6Qt7WqV042nNIZFPY9oeqd\nHKwq6gwn8O59qhCwvhkYGvhJ5pheE+q0ye5nB4V2N3pK8+5GjcXCLZkC3Hza\nXc5d26OG4u1segiYmf/1lNZhwJX9zLGGMLEQIiINHHbqP2zSlmXHjf0u5ejH\ngaqwTrBY/Pelmh+9RpKf5lTu4kuUycd9P5ngWSPMunPMVmslxn9IBxBelNS+\nRFTthGh4s7V7xRJemXkpYedv4QrsDLKjPPa2wDSST7KRXy/MBRKdjGudNH6K\nbiMVxzx+YSd6KH8WJ0WmKarifoT4Gop8GHS+l6q61PPz0EHquuWqh+tkBVMk\nO6QcRBz6941mzoWzXjvLhVB3i6WRNr2AD3x9Z4ThszS9jiybM5Qjx132BxgL\nSCCPY17tYr3ZVo+gt0n9v2LaeyW6gQw3afU+pcv+sO2mAkrXkxzOTu1tzHV3\naydB1Rf3FOlbw9q6Jfv9xTYocvGNftOB0rIfQoh0wygou1M04H/0PcGEN1/y\nNKiNQhF4OfBPDeA781A/ruN6Eg5cmLvCmwPCBQQ4+N26nHXMbanwMiVJr0Hd\nLzGKb/UXru1DjtP0oUYw9xsi7M0KkcYOFeDEgzxCTtxvPheDnn8QgbKLydLs\n4zTT\r\n=7raO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxAq4+T2isOTh1y306ovn1LjBa3Wq2sWNOYopfKFaznwIgXa2ISgDRuPnrEdgCMcm7PZDzH9KtCizNBL+x8movPgY="}]},"_npmUser":{"name":"hsson","email":"alex.hsson@gmail.com"},"directories":{},"maintainers":[{"name":"hsson","email":"alex.hsson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-duration_1.0.0_1629385078383_0.6817676470018001"},"_hasShrinkwrap":false},"1.1.0":{"name":"ts-duration","version":"1.1.0","description":"Type safe duration representation","main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","author":{"name":"Alexander Håkansson","email":"alex.hsson@gmail.com","url":"https://hsson.dev"},"repository":{"type":"git","url":"git+https://github.com/hsson/ts-duration.git"},"keywords":["time","duration"],"scripts":{"test":"npm run lint && jest src --coverage --collectCoverageFrom 'src/**/*.ts' --passWithNoTests","lint":"eslint . --ext .ts --ignore-pattern dist","lint:fix":"eslint . --ext .ts --ignore-pattern dist --fix","clean":"rm -rf ./dist/","compile":"npm run clean; tsc --build tsconfig.build.json","prepare":"npm run compile"},"devDependencies":{"@types/jest":"^27.0.1","@types/node":"^14.11.2","@typescript-eslint/eslint-plugin":"^4.15.1","@typescript-eslint/parser":"^4.15.1","eslint":"^7.20.0","eslint-config-prettier":"^7.2.0","eslint-plugin-jest":"^24.3.1","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^3.3.1","eslint-plugin-tsdoc":"^0.2.14","jest":"^27.0.6","pre-commit":"^1.2.2","prettier":"^2.2.1","ts-jest":"^27.0.5","typescript":"^4.1.5"},"jest":{"preset":"ts-jest","testEnvironment":"node"},"gitHead":"cd1b77331d7a0b0930bbbd77af7fc7a86a6523f5","bugs":{"url":"https://github.com/hsson/ts-duration/issues"},"homepage":"https://github.com/hsson/ts-duration#readme","_id":"ts-duration@1.1.0","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Of6c/pxDD8bpVoxKjd3mjozyozJmOjGAi/bb1VRW6Pfhu3lTqjCWhKi7IW+PX+j0ZgO7NQ6yo/BkP7MgM/xhOA==","shasum":"0383ccf11156f224847ae1ec6a57e75953c56153","tarball":"https://registry.npmjs.org/ts-duration/-/ts-duration-1.1.0.tgz","fileCount":16,"unpackedSize":31849,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhH44/CRA9TVsSAnZWagAAUcMP/Az9BkEYdN8V7E21gPzv\nVFjJe99npPeYcNMSnHsQnu70ht35EFh1lb2kGDUgaUj4Vzd5qSneJcsxmJWi\nwu+e3FJ2LxHTR/2HmnqgTukOJCZut5SJBNgqU82Pv+xGtPz1E97Am62kKRAu\noqVnderOZRBlFFrSPZnZKLMlg7a5uTvsOedJPX6qvn5stMoI9/NmFDnV9R8/\n5JfR/Iba9kC+/q8rJuXq0CRM9NT6yzZXZLD7LT0uSqre5LXTwVyZScqUge7h\nPH5gz8ZShkz+dcKahKioZiPsqWW4dBAO8VyBgf3a+wP1nTIxwEU2vWWdcdFh\nQKOyiBhqUZjWpLLWExYCpV1hzCwnay7xkcoispXygEvAX1U/6GtZjr6nhX8x\n9Xb7HjYtlnFO8tzW51ZkqUvhWvQrNBSKK/Uti/A0nUfUVj7FfxZx5ups32QG\n/eVjzxmpIDCgF37pBJPgiR/UOLrYfqtvLtekMsWr7FV3uOQ1+U63BtmK8NH6\nE8OeioK7zL8bj2pRcF79i91YnLHfvAdyRARvNRSrh70gcFTDL4Bn6ijGZsf5\n1oi3eyePTsZqIDXgvYS1dMgylA7iW+NguHXOfghGItx2GsjFEP/6o8yol3yx\nR1qz9ScF+ubbcHTQr9+b5XwKcerOI3l9rJlkHTqToC8mVz/kuKJJg1AoOO2N\nJW9i\r\n=US6s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFYTchWdz8jgbdXrq9QHSXXug4iSQP6G7xRHsaGFsM3zAiALvNljmsa7pQTpABMpVqGZtFuSx9oVWdxkMV1Lt9OfeA=="}]},"_npmUser":{"name":"hsson","email":"alex.hsson@gmail.com"},"directories":{},"maintainers":[{"name":"hsson","email":"alex.hsson@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ts-duration_1.1.0_1629457983642_0.9921158100895602"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-19T14:39:11.778Z","0.0.1":"2021-08-19T14:39:11.921Z","modified":"2022-05-22T07:05:56.139Z","1.0.0":"2021-08-19T14:57:58.540Z","1.1.0":"2021-08-20T11:13:03.791Z"},"maintainers":[{"name":"hsson","email":"alex.hsson@gmail.com"}],"description":"Type safe duration representation","homepage":"https://github.com/hsson/ts-duration#readme","keywords":["time","duration"],"repository":{"type":"git","url":"git+https://github.com/hsson/ts-duration.git"},"author":{"name":"Alexander Håkansson","email":"alex.hsson@gmail.com","url":"https://hsson.dev"},"bugs":{"url":"https://github.com/hsson/ts-duration/issues"},"license":"MIT","readme":"# ts-duration\n\n<span class=\"badge-npmversion\"><a href=\"https://npmjs.org/package/ts-duration\" title=\"View this project on NPM\"><img src=\"https://img.shields.io/npm/v/ts-duration.svg\" alt=\"NPM version\" /></a></span>\n\nType safe duration calculations in Javascript and Typescript! No more keeping track of units with silly variable names (I'm looking at you `reallyLongVariableNameOfTimeDiffInMs` 👀). This type is heavily inspired by the `time.Duration` type in Go (Golang).\n\n## Quick Start\nInstall with `npm install ts-duration`.\n\n```typescript\nimport { Duration } from 'ts-duration';\n\n// ...\n\nconst a = Duration.millisecond(3500);\nconst b = Duration.second(4.2);\nconsole.log(`${a} + ${b} = ${a.add(b)}`); // prints `3500ms + 4.2s = 7.7s`\n```\n","readmeFilename":"README.md"}