{"_id":"next-timeago","_rev":"1-79065b0c726f8e8cae868cd94c239a51","name":"next-timeago","dist-tags":{"latest":"0.2.0"},"versions":{"0.0.1":{"name":"next-timeago","version":"0.0.1","description":"","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"author":"","license":"ISC","_id":"next-timeago@0.0.1","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-bX5kESTQSbuHO212rTBJJe0zPz/bOsoYRcTrX1v4d0r3NF2KelFsx9dVwpq2JOKhQYjm8stWgC9axmq+iLF0NA==","shasum":"56ab9d227b793e0449eb799de220671915136d43","tarball":"https://registry.npmjs.org/next-timeago/-/next-timeago-0.0.1.tgz","fileCount":2,"unpackedSize":208,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuT7vwfZKt6AGTOdbuavi3S4gYSn2OGXSmArAFhRlYIAIgDWx6A8IzgkqSOMKolanNYZoMCShYU68irb0yYbDC548="}]},"_npmUser":{"name":"bunlong","email":"bunlong.van@gmail.com"},"directories":{},"maintainers":[{"name":"bunlong","email":"bunlong.van@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/next-timeago_0.0.1_1692764722873_0.2896447663761397"},"_hasShrinkwrap":false},"0.2.0":{"name":"next-timeago","version":"0.2.0","description":"React timeago component for your next React apps.","author":{"name":"Bunlong","email":"bunlong.van@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Bunlong/next-timeago.git"},"bugs":{"url":"https://github.com/Bunlong/next-timeago.git/issues"},"keywords":["next-timeago","nextjs","next","reactjs","react","timeago","react-timeago"],"homepage":"https://github.com/Bunlong/next-timeago","main":"dist/next-timeago.js","module":"dist/next-timeago.es.js","jsnext:main":"dist/next-timeago.es.js","types":"dist/next-timeago.d.ts","@comment unpkg":"dist/next-timeago.umd.js","engines":{"node":">=8","npm":">=5"},"scripts":{"@test":"jest --runInBand","build":"rollup -c","prettier":"prettier --write './src/*.ts' './src/*.tsx' './src/languages/*.ts' --config ./.prettierrc","lint:check":"eslint ./src --ext .tsx,.ts --report-unused-disable-directives","bundlesize":"npm run build && bundlesize","dev":"rollup -c -w","prepare":"npm run build","predeploy":"cd docs && npm install && npm run build","deploy":"gh-pages -d docs/build"},"devDependencies":{"@babel/core":"^7.15.0","@babel/plugin-proposal-class-properties":"^7.14.5","@babel/preset-env":"^7.15.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^20.0.0","@rollup/plugin-node-resolve":"^13.0.4","@types/react":"^18.0.14","@types/react-dom":"^18.0.5","@types/react-test-renderer":"^18.0.0","@typescript-eslint/eslint-plugin":"^4.29.3","@typescript-eslint/parser":"^4.29.3","bundlesize":"^0.18.1","eslint":"^7.32.0","eslint-plugin-react":"^7.24.0","eslint-plugin-react-hooks":"^4.2.0","jest":"^27.1.0","mutationobserver-shim":"^0.3.7","prettier":"^2.3.2","react":"^18.2.0","react-dom":"^18.2.0","react-scripts":"^2.1.3","react-test-renderer":"^18.2.0","rollup":"^2.56.3","rollup-plugin-terser":"^7.0.2","rollup-plugin-typescript2":"^0.32.1","ts-jest":"^27.0.5","tslib":"^2.3.1","typescript":"^4.4.2"},"bundlesize":[{"path":"./dist/*.js","maxSize":"900 kB"},{"path":"./dist/**/*.js","maxSize":"900 kB"},{"path":"./dist/*.ts","maxSize":"750 B"},{"path":"./dist/**/*.ts","maxSize":"770 B"}],"peerDependencies":{"react":">=17.0.0"},"gitHead":"3c59b8f483e6b51d1aca3b9607ce8826ea5924ca","_id":"next-timeago@0.2.0","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-XBvTTlzqHD95WN4bdhEDMEt17vDJmfICNeBOty/e2/cHA9R7vingBdnatYRBWN9AsMkns0B4W+zlUG4Ma3Aw8g==","shasum":"b91a75d4709bfdaea824844f429a7bc19d46ebf2","tarball":"https://registry.npmjs.org/next-timeago/-/next-timeago-0.2.0.tgz","fileCount":83,"unpackedSize":92758,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGlr+KYB5nKfoqlpxWGj7MNvWXlH3OghB5RPJ1WDZgVAIhAIozP5qdx/f8P4RIa1FR6GZeBBPg/2/Rl6HQYY6Q8UWh"}]},"_npmUser":{"name":"bunlong","email":"bunlong.van@gmail.com"},"directories":{},"maintainers":[{"name":"bunlong","email":"bunlong.van@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/next-timeago_0.2.0_1692778685451_0.19825173308249178"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-23T04:25:22.873Z","0.0.1":"2023-08-23T04:25:23.022Z","modified":"2023-08-23T08:18:05.894Z","0.2.0":"2023-08-23T08:18:05.679Z"},"maintainers":[{"name":"bunlong","email":"bunlong.van@gmail.com"}],"license":"MIT","readme":"# next-timeago\n\nReact timeago component for your next React apps.\n\n[![NPM](https://img.shields.io/npm/v/next-timeago.svg)](https://www.npmjs.com/package/next-timeago) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## 🎁 Features\n\n* No dependencies\n* Compatible with both JavaScript and TypeScript\n* Support for various languages\n\n## 🔧 Install\n\nnext-timeago is available on npm. It can be installed with the following command:\n\n```\nnpm install next-timeago --save\n```\n\nnext-timeago is available on yarn as well. It can be installed with the following command:\n\n```\nyarn add next-timeago --save\n```\n\n## 💡 Usage\n\n```ts\nimport { useTimeAgo } from 'next-timeago';\n\nconst Home = () => {\n  const { TimeAgo } = useTimeAgo();\n\n  return (\n    <>\n      <TimeAgo date='July 1, 2023' locale='kh' />\n\n      <TimeAgo date='July 1, 2023' locale='JA' />\n\n      <TimeAgo date='July 1, 2023 9:00 pm' />\n\n      <TimeAgo date='July 1, 2023 20:00' />\n    </>\n  );\n}\n\nexport default Home;\n```\n\n## Props\n\n<table>\n  <thead>\n    <tr>\n      <th>Prop</th>\n      <th>Type</th>\n      <th>Default</th>\n      <th>Require</th>\n      <th>Description</th>\n    </tr>\n  <thead>\n  <tbody>\n    <tr>\n      <td>date</td>\n      <td>string | number | Date</td>\n      <td></td>\n      <td>✔️</td>\n      <td>A date in the past.</td>\n    </tr>\n    <tr>\n      <td>locale</td>\n      <td>string</td>\n      <td><code>en</code></td>\n      <td>❌</td>\n      <td>Support for various languages.</td>\n    </tr>\n    <tr>\n      <td>live</td>\n      <td>boolean</td>\n      <td><code>true</code></td>\n      <td>❌</td>\n      <td>Live by default and will auto update it's value.</td>\n    </tr>\n    <tr>\n      <td>element</td>\n      <td>string | React.ElementType<any></td>\n      <td><code>time</code></td>\n      <td>❌</td>\n      <td>HTML tag that is used to wrap the live updating string.</td>\n    </tr>\n  </tbody>\n</table>\n\n### List of Locale Codes\n\n<table>\n  <thead>\n    <tr>\n      <th>Language Name</th>\n      <th>Code</th>\n    </tr>\n  <thead>\n  <tbody>\n    <tr>\n      <td>Afrikaans</td>\n      <td><code>af</code></td>\n    </tr>\n    <tr>\n      <td>Arabic</td>\n      <td><code>ar</code></td>\n    </tr>\n    <tr>\n      <td>Azerbaijani</td>\n      <td><code>az</code></td>\n    </tr>\n    <tr>\n      <td>Azerbaijani shortened</td>\n      <td><code>az-short</code></td>\n    </tr>\n    <tr>\n      <td>Belarusian</td>\n      <td><code>be</code></td>\n    </tr>\n    <tr>\n      <td>Bulgarian</td>\n      <td><code>bg</code></td>\n    </tr>\n    <tr>\n      <td>Bosnian</td>\n      <td><code>bs</code></td>\n    </tr>\n    <tr>\n      <td>Catalan</td>\n      <td><code>ca</code></td>\n    </tr>\n    <tr>\n      <td>Czech</td>\n      <td><code>cs</code></td>\n    </tr>\n    <tr>\n      <td>Welsh</td>\n      <td><code>cy</code></td>\n    </tr>\n    <tr>\n      <td>Danish</td>\n      <td><code>da</code></td>\n    </tr>\n    <tr>\n      <td>German</td>\n      <td><code>de</code></td>\n    </tr>\n    <tr>\n      <td>German shortened</td>\n      <td><code>de-short</code></td>\n    </tr>\n    <tr>\n      <td>Divehi, Dhivehi, Maldivian</td>\n      <td><code>dv</code></td>\n    </tr>\n    <tr>\n      <td>Greek</td>\n      <td><code>el</code></td>\n    </tr>\n    <tr>\n      <td>English</td>\n      <td><code>en</code></td>\n    </tr>\n    <tr>\n      <td>English shortened</td>\n      <td><code>en-short</code></td>\n    </tr>\n    <tr>\n      <td>Spanish</td>\n      <td><code>es</code></td>\n    </tr>\n    <tr>\n      <td>Spanish shortened</td>\n      <td><code>es-short</code></td>\n    </tr>\n    <tr>\n      <td>Estonian</td>\n      <td><code>et</code></td>\n    </tr>\n    <tr>\n      <td>Basque</td>\n      <td><code>eu</code></td>\n    </tr>\n    <tr>\n      <td>Persian</td>\n      <td><code>fa</code></td>\n    </tr>\n    <tr>\n      <td>Persian shortened</td>\n      <td><code>fa-short</code></td>\n    </tr>\n    <tr>\n      <td>Finnish</td>\n      <td><code>fi</code></td>\n    </tr>\n    <tr>\n      <td>French</td>\n      <td><code>fr</code></td>\n    </tr>\n    <tr>\n      <td>French shortened</td>\n      <td><code>fr-short</code></td>\n    </tr>\n    <tr>\n      <td>Galician</td>\n      <td><code>gl</code></td>\n    </tr>\n    <tr>\n      <td>Hebrew</td>\n      <td><code>he</code></td>\n    </tr>\n    <tr>\n      <td>Hindi</td>\n      <td><code>hi</code></td>\n    </tr>\n    <tr>\n      <td>Croatian</td>\n      <td><code>hr</code></td>\n    </tr>\n    <tr>\n      <td>Hungarian</td>\n      <td><code>hu</code></td>\n    </tr>\n    <tr>\n      <td>Armenian</td>\n      <td><code>hy</code></td>\n    </tr>\n    <tr>\n      <td>Indonesian</td>\n      <td><code>id</code></td>\n    </tr>\n    <tr>\n      <td>Icelandic</td>\n      <td><code>is</code></td>\n    </tr>\n    <tr>\n      <td>Italian</td>\n      <td><code>it</code></td>\n    </tr>\n    <tr>\n      <td>Italian shortened</td>\n      <td><code>it-short</code></td>\n    </tr>\n    <tr>\n      <td>Japanese</td>\n      <td><code>ja</code></td>\n    </tr>\n    <tr>\n      <td>Javanesse</td>\n      <td><code>jv</code></td>\n    </tr>\n    <tr>\n      <td>Georgian</td>\n      <td><code>jv</code></td>\n    </tr>\n    <tr>\n      <td>Georgian shortened</td>\n      <td><code>ka-short</code></td>\n    </tr>\n    <tr>\n      <td>Khmer</td>\n      <td><code>kh</code></td>\n    </tr>\n    <tr>\n      <td>Korean</td>\n      <td><code>ko</code></td>\n    </tr>\n    <tr>\n      <td>Russian</td>\n      <td><code>ky</code></td>\n    </tr>\n    <tr>\n      <td>Lithuanian</td>\n      <td><code>lt</code></td>\n    </tr>\n    <tr>\n      <td>Latvian</td>\n      <td><code>lv</code></td>\n    </tr>\n    <tr>\n      <td>Macedonian</td>\n      <td><code>mk</code></td>\n    </tr>\n    <tr>\n      <td>Dutch</td>\n      <td><code>nl</code></td>\n    </tr>\n    <tr>\n      <td>Norwegian</td>\n      <td><code>no</code></td>\n    </tr>\n    <tr>\n      <td>Catalan</td>\n      <td><code>oc</code></td>\n    </tr>\n    <tr>\n      <td>Polish</td>\n      <td><code>pl</code></td>\n    </tr>\n    <tr>\n      <td>Portuguese</td>\n      <td><code>pt</code></td>\n    </tr>\n    <tr>\n      <td>Brazilian Portuguese</td>\n      <td><code>pt-br</code></td>\n    </tr>\n    <tr>\n      <td>Portuguese Brasil shortened</td>\n      <td><code>pt-br-short</code></td>\n    </tr>\n    <tr>\n      <td>Portuguese shortened</td>\n      <td><code>pt-short</code></td>\n    </tr>\n    <tr>\n      <td>Romanian</td>\n      <td><code>ro</code></td>\n    </tr>\n    <tr>\n      <td>Serbian</td>\n      <td><code>rs</code></td>\n    </tr>\n    <tr>\n      <td>Russian</td>\n      <td><code>ru</code></td>\n    </tr>\n    <tr>\n      <td>Kinyarwanda</td>\n      <td><code>rw</code></td>\n    </tr>\n    <tr>\n      <td>Sinhalese</td>\n      <td><code>si</code></td>\n    </tr>\n    <tr>\n      <td>Slovak</td>\n      <td><code>sk</code></td>\n    </tr>\n    <tr>\n      <td>Slovenian with support for dual</td>\n      <td><code>sl</code></td>\n    </tr>\n    <tr>\n      <td>Somali</td>\n      <td><code>so</code></td>\n    </tr>\n    <tr>\n      <td>Serbian</td>\n      <td><code>sr</code></td>\n    </tr>\n    <tr>\n      <td>Swedish</td>\n      <td><code>sv</code></td>\n    </tr>\n    <tr>\n      <td>Tamil</td>\n      <td><code>ta</code></td>\n    </tr>\n    <tr>\n      <td>Thai</td>\n      <td><code>th</code></td>\n    </tr>\n    <tr>\n      <td>Turkish</td>\n      <td><code>tr</code></td>\n    </tr>\n    <tr>\n      <td>Turkish shortened</td>\n      <td><code>tr-short</code></td>\n    </tr>\n    <tr>\n      <td>Ukrainian</td>\n      <td><code>uk</code></td>\n    </tr>\n    <tr>\n      <td>Uzbek</td>\n      <td><code>uz</code></td>\n    </tr>\n    <tr>\n      <td>Vietnamese</td>\n      <td><code>vi</code></td>\n    </tr>\n    <tr>\n      <td>Simplified Chinese</td>\n      <td><code>zh-CN</code></td>\n    </tr>\n    <tr>\n      <td>Traditional Chinese, zh-tw</td>\n      <td><code>zh-TW</code></td>\n    </tr>\n  </tbody>\n</table>\n\n## 📜 Changelog\n\nLatest version 0.2.0 (2023-08-23):\n\n  * Upgrade dependencies\n\nDetails changes for each release are documented in the [CHANGELOG.md](https://github.com/Bunlong/next-timeago/blob/master/CHANGELOG.md).\n\n## ❗ Issues\n\nIf you think any of the `next-timeago` can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.\n\n## 💪 Contribution\n\nWe'd love to have your helping hand on contributions to `next-timeago` by forking and sending a pull request!\n\nYour contributions are heartily ♡ welcome, recognized and appreciated. (✿◠‿◠)\n\nHow to contribute:\n\n- Open pull request with improvements\n- Discuss ideas in issues\n- Spread the word\n- Reach out with any feedback\n\n## 🏆 Contributors\n\n<table>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://github.com/Bunlong\">\n        <img src=\"https://avatars0.githubusercontent.com/u/1308397?s=400&u=945dc6b97571e2b98b659d34b1c81ae2514046bf&v=4\" width=\"100\" alt=\"Bunlong\" />\n        <br />\n        <sub>\n          <b>Bunlong</b>\n        </sub>\n      </a>\n    </td>\n  </tr>\n</table>\n\n## ⚖️ License\n\nThe MIT License [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n","readmeFilename":"README.md","description":"React timeago component for your next React apps.","homepage":"https://github.com/Bunlong/next-timeago","keywords":["next-timeago","nextjs","next","reactjs","react","timeago","react-timeago"],"repository":{"type":"git","url":"git+https://github.com/Bunlong/next-timeago.git"},"author":{"name":"Bunlong","email":"bunlong.van@gmail.com"},"bugs":{"url":"https://github.com/Bunlong/next-timeago.git/issues"}}