{"_id":"@augustinmauroy/twas","_rev":"3-63aff3b5dec8ef1306e148aaf9d31808","name":"@augustinmauroy/twas","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@augustinmauroy/twas","version":"1.0.0","author":{"name":"Augustin Mauroy"},"license":"MIT","_id":"@augustinmauroy/twas@1.0.0","maintainers":[{"name":"augustinmauroy","email":"augustin.mauroy@outlook.fr"}],"homepage":"https://github.com/AugustinMauroy/twas#readme","bugs":{"url":"https://github.com/AugustinMauroy/twas/issues"},"dist":{"shasum":"2466299eb3d3021407b1a6985dd5ff272910a102","tarball":"https://registry.npmjs.org/@augustinmauroy/twas/-/twas-1.0.0.tgz","fileCount":6,"integrity":"sha512-OJE6q/U6yJdQ7uNVJ9XmsQ1oYboFVZX3JvbzmNIIE//kbKO/LyEhsiPtm3rK5iHJQBuVf6Mu2YMPDMDDPxhZ6g==","signatures":[{"sig":"MEUCIQCRgyT3b0qSWAyePj4aohFivDlceh/YkqISUa/ja4M4rgIgJgYO3KmZRoP62WC/8R0MFVID3c6cv8BkCoaao+cLkTw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@augustinmauroy%2ftwas@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":6565},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"33a4c402e3f83efe417f95bec7b24cb666e5de8f","scripts":{"test":"node --test tests/**/*.test.ts","build":"tsc","biome:ci":"biome ci ./","biome:lint":"biome lint ./","pre-commit":"node --run biome:lint:fix; node --run biome:format:fix","types:check":"tsc --noEmit","biome:format":"biome format ./","test:coverage":"node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=./coverage.lcov --test-reporter=spec --test-reporter-destination=stdout tests/**/*.test.ts","biome:lint:fix":"biome lint --fix ./","biome:format:fix":"biome format --fix ./"},"_npmUser":{"name":"augustinmauroy","email":"augustin.mauroy@outlook.fr"},"repository":{"url":"git+https://github.com/AugustinMauroy/twas.git","type":"git"},"_npmVersion":"10.9.2","description":"A relative time string library","directories":{},"_nodeVersion":"23.8.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"5.8.1-rc","@types/node":"22.13.1","@biomejs/biome":"1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/twas_1.0.0_1740234710937_0.5908643520755519","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@augustinmauroy/twas","version":"1.0.1","author":{"name":"Augustin Mauroy"},"license":"MIT","_id":"@augustinmauroy/twas@1.0.1","maintainers":[{"name":"augustinmauroy","email":"augustin.mauroy@outlook.fr"}],"homepage":"https://github.com/AugustinMauroy/twas#readme","bugs":{"url":"https://github.com/AugustinMauroy/twas/issues"},"dist":{"shasum":"b1aa8c047670315ffe9e98474aaee65d0d31aaf5","tarball":"https://registry.npmjs.org/@augustinmauroy/twas/-/twas-1.0.1.tgz","fileCount":6,"integrity":"sha512-9EuJVoqUJzw/UT1+5NtPlRj4Ui/edCUmN++LSHd1fQxeX1sY+0JxRKCN6SlSKXMWFWJqfw7E6gC8W3A3G6g/lg==","signatures":[{"sig":"MEUCICnaN+7ciTvCn7+yY5ENCve9XenKHVBWIzSvoNjl1Q8LAiEAjl6SDhVOZtfq4My6iY89OSiuwfpsN3CAsV6YdNYCflM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@augustinmauroy%2ftwas@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7949},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"3988434a49347bc57f35579063558ca27f9a1b95","scripts":{"build":"tsc","biome:ci":"biome ci ./","test-bun":"bun test ./tests/index-bun.test.ts","test-deno":"deno test tests/**/*-deno.test.ts --no-check","test-node":"node --test tests/**/*-node.test.ts","biome:lint":"biome lint ./","pre-commit":"node --run biome:lint:fix; node --run biome:format:fix","types:check":"tsc --noEmit","biome:format":"biome format ./","biome:lint:fix":"biome lint --fix ./","biome:format:fix":"biome format --fix ./","test-node:coverage":"node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=./coverage.lcov --test-reporter=spec --test-reporter-destination=stdout tests/**/*-node.test.ts"},"_npmUser":{"name":"augustinmauroy","email":"augustin.mauroy@outlook.fr"},"repository":{"url":"git+https://github.com/AugustinMauroy/twas.git","type":"git"},"_npmVersion":"10.9.2","description":"A relative time string library","directories":{},"_nodeVersion":"23.8.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"5.8.1-rc","@types/node":"22.13.1","@biomejs/biome":"1.9.4"},"_npmOperationalInternal":{"tmp":"tmp/twas_1.0.1_1740242786672_0.9694221818013238","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@augustinmauroy/twas","description":"A relative time string library","version":"1.1.0","type":"module","author":{"name":"Augustin Mauroy"},"license":"MIT","main":"dist/index.js","scripts":{"biome:format:fix":"biome format --fix ./","biome:format":"biome format ./","biome:lint:fix":"biome lint --fix ./","biome:lint":"biome lint ./","biome:ci":"biome ci ./","build":"tsc","pre-commit":"node --run biome:lint:fix; node --run biome:format:fix","test-bun":"bun test ./tests/index-bun.test.ts","test-deno":"deno test tests/**/*-deno.test.ts --no-check","test-node":"node --test tests/**/*-node.test.ts","test-node:coverage":"node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=./coverage.lcov --test-reporter=spec --test-reporter-destination=stdout tests/**/*-node.test.ts","types:check":"tsc --noEmit"},"devDependencies":{"typescript":"5.8.1-rc","@biomejs/biome":"1.9.4","@types/node":"22.13.1"},"repository":{"type":"git","url":"git+https://github.com/AugustinMauroy/twas.git"},"_id":"@augustinmauroy/twas@1.1.0","gitHead":"511cd103a4fc8eea80420398aa9032e56d4db5b9","types":"./dist/index.d.ts","bugs":{"url":"https://github.com/AugustinMauroy/twas/issues"},"homepage":"https://github.com/AugustinMauroy/twas#readme","_nodeVersion":"23.11.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-bsNmGeeU+5mfitkiEgg2gHITUB+RD4cIHFwl62mRcqNV+YGl6B+Gm8hwKqe7CgWDqFNG4/2W11Lwx0tu1MQvhA==","shasum":"ac4cf8fece1d794f57087baf28c632849eb0d433","tarball":"https://registry.npmjs.org/@augustinmauroy/twas/-/twas-1.1.0.tgz","fileCount":6,"unpackedSize":9190,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@augustinmauroy%2ftwas@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDGHemiw3iHPDMzRDufO77n5R2sAjXdTGHgwI9Tz56GFwIhAKDAZh1moFTIpY4l/ag96+ZzvgbZDl+Yx3YVJgNicvOb"}]},"_npmUser":{"name":"augustinmauroy","email":"augustin.mauroy@outlook.fr"},"directories":{},"maintainers":[{"name":"augustinmauroy","email":"augustin.mauroy@outlook.fr"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/twas_1.1.0_1746367182729_0.413385174554598"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-22T14:31:50.822Z","modified":"2025-05-04T13:59:43.273Z","1.0.0":"2025-02-22T14:31:51.118Z","1.0.1":"2025-02-22T16:46:26.830Z","1.1.0":"2025-05-04T13:59:42.890Z"},"bugs":{"url":"https://github.com/AugustinMauroy/twas/issues"},"author":{"name":"Augustin Mauroy"},"license":"MIT","homepage":"https://github.com/AugustinMauroy/twas#readme","repository":{"type":"git","url":"git+https://github.com/AugustinMauroy/twas.git"},"description":"A relative time string library","maintainers":[{"name":"augustinmauroy","email":"augustin.mauroy@outlook.fr"}],"readme":"# @augustinmauroy/twas\n\nA relative time string library\n\n[![npm version](https://img.shields.io/npm/v/@augustinmauroy/twas.svg)](https://www.npmjs.com/package/@augustinmauroy/twas)\n[![JSR](https://jsr.io/badges/@augustinmauroy/twas)](https://jsr.io/@augustinmauroy/twas)\n\n> **⚠️ WARNING ⚠️**: This library use `Intl.DurationFormat` which is not yet available in all browsers. You can check the [compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat#browser_compatibility) for more information.\n\n## Example\n\n```js\nimport { twas } from '@augustinmauroy/twas';\n\nconst strDiff = twas(new Date('2021-01-01'), new Date('2021-01-02'));\nconsole.log(strDiff); // '1 day ago'\n```\n\n## Prior art\n\nThis library is inspired by [`vutran/twas`](https://github.com/vutran/twas).\n","readmeFilename":"README.md"}