{"_id":"@benzara/svelte-animated-counter","_rev":"6-2578d734744d130bac3e010332a1ef31","name":"@benzara/svelte-animated-counter","dist-tags":{"latest":"0.0.3"},"versions":{"0.1.0":{"name":"@benzara/svelte-animated-counter","version":"0.1.0","keywords":["countdown","countup","counter","animated","timer","svelte"],"author":{"url":"https://benzara.me","name":"Benzara Tahar Benlahcene","email":"benzara.tahar@gmail.com"},"_id":"@benzara/svelte-animated-counter@0.1.0","maintainers":[{"name":"benzara","email":"benzara.tahar@gmail.com"}],"homepage":"https://svelte-animated-counter.vercel.app","bugs":{"url":"https://github.com/benzara-tahar/svelte-animated-counter/issues"},"dist":{"shasum":"d445532256f561bc41373ccea88d85a314a795a6","tarball":"https://registry.npmjs.org/@benzara/svelte-animated-counter/-/svelte-animated-counter-0.1.0.tgz","fileCount":7,"integrity":"sha512-owBNWnZI+kLLIOsapWTB2KaXhXvvkD7oE6ShwpWorp/uDqhwl07UA1ch2OSzXtIGbgX2S31Gh5PGTq9SDaQ6Uw==","signatures":[{"sig":"MEUCIBWlQsk5NC3bIAleBXgbV2YmqSfUAkr9oCNNiAWNzKFQAiEAuRfclUHEuYs/EjfGsCm3EfbCEA/P8QQ2y/yaUJPERGw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJie1WiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8JhAAnxcEXu7DSil9/uW4vwJDyexlOkIjYdCbhbAOcluTCHDkceiW\r\naBSL9cjiRWKytxeCwsiEapseNxOoDEC9CUzEjcG5c7Mz8ej8XwOnDoyS/EDx\r\nnsGf67VmuqwmEHwd91uOA0D2XMkRWPhudnYChObHutUEP2rmjqn6bOtsibnF\r\nsxeWzddj7skHnDD9nIKOlwJEVwwAQvuoN8LZUydF2x7R6CJRjwbLcMS0qVr5\r\ngOQ0pcAgSDnp877kl6QfaOR8+OthnaQNlcq0bLAGebwuRJGOtyx2OeHpS2wq\r\n/Q+ym3cXah2qSXQ/8/Rvjn1Ko4lKBOkNJsl6MI892SRVv8OY2lbM3Q77GnSi\r\nk7hCIrX3sHe6gQ3eDfnJFgPSOs1CP6NTKzp5yIItyM6GNJSoBm572T0iMkHd\r\nmWO+IZTzCHlheCwvTiVkdobCuf/M9nD+r0YN6x8Gygxl4NvHk5FL+NZe5ENR\r\npQ7jFi6iH+S538gQ4y4rYw57PDOWKAr5YooBGJwKJeJGzy3rz9Rer+XBG2/Z\r\n4QPh3QJt3ypFQjh9yFLCRFsLs5MXbP1D44VY5M7Os9KH1+FZkRKPAWK6cDcX\r\n2sMFLXu+x9ilwz5wngUua6Jod1YYX8tr1F8pGIpWC8yr4Aq/HgdcFP16ZTdV\r\nkA2BuIRNxJVICEOCrKjVvEcR8YtDmNb2rec=\r\n=kr/f\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","types":"./index.d.ts","svelte":"./index.js","exports":{".":"./index.js","./package.json":"./package.json","./AnimatedCounter.svelte":"./AnimatedCounter.svelte"},"gitHead":"f734992ef830e7e7202a7af8917d48a7ae3b6830","_npmUser":{"name":"benzara","email":"benzara.tahar@gmail.com"},"repository":{"url":"git+https://github.com/benzara-tahar/svelte-animated-counter.git","type":"git"},"_npmVersion":"8.1.2","description":"A tiny ( < 2Kb ) animated counter component for svelte","directories":{},"_nodeVersion":"16.13.1","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.3.1","eslint":"^8.12.0","svelte":"^3.46.0","prettier":"^2.5.1","svelte2tsx":"^0.5.9","typescript":"~4.6.2","svelte-check":"^2.2.6","@sveltejs/kit":"next","@types/cookie":"^0.4.1","@playwright/test":"^1.21.0","svelte-preprocess":"^4.10.1","eslint-plugin-svelte3":"^4.0.0","@sveltejs/adapter-auto":"next","eslint-config-prettier":"^8.3.0","prettier-plugin-svelte":"^2.5.0","@typescript-eslint/parser":"^5.10.1","@typescript-eslint/eslint-plugin":"^5.10.1"},"_npmOperationalInternal":{"tmp":"tmp/svelte-animated-counter_0.1.0_1652250018129_0.461425718590343","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@benzara/svelte-animated-counter","version":"0.0.3","keywords":["countdown","countup","counter","animated","timer","svelte"],"author":{"url":"https://benzara.me","name":"Benzara Tahar Benlahcene","email":"benzara.tahar@gmail.com"},"_id":"@benzara/svelte-animated-counter@0.0.3","maintainers":[{"name":"benzara","email":"benzara.tahar@gmail.com"}],"homepage":"https://svelte-animated-counter.vercel.app","bugs":{"url":"https://github.com/benzara-tahar/svelte-animated-counter/issues"},"dist":{"shasum":"193068a86559e60aa75812614f0e84c445ece1af","tarball":"https://registry.npmjs.org/@benzara/svelte-animated-counter/-/svelte-animated-counter-0.0.3.tgz","fileCount":7,"integrity":"sha512-C/z0qDin5TgyhTE4xcnND0DAMwoRSTICpwXJnJLgduhWBIqH8YQPiF2zB/8ZvGlqWfHlitmxuLabqCzJIEWhaQ==","signatures":[{"sig":"MEQCIBbhjqONvVuph/Ff/rhIWpxeEpvevPcD5ZBBZNO+ZeLhAiARsQKf+JBnyebNs0ydFNWs73x0QXr8Th2OWGnjtVxuDw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjAo8mACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqMsRAAi2MJ6Kar9m5zM3L7efHggcFk1cxBju1jiL7ZOw4wswZtArv9\r\nTBYZiwKfTIOJaiz13LqOi5NxPpUjDbUxA/wESO0P4xP3XfRE/FkMhdzeI8AL\r\nhprDV2d+HIuf64Gwzxw3eaJ98tjk3ZY3ezO5VfGzaitm7IQtYxTKjqblLRmg\r\nSP3f4MQXcXHtJxIjH+bMabABJFOgUZf/fVcFB+60cx4v5z3zypxazuA5X9OW\r\nw1YZHwcW75GdT1YRWyzMY6n3jqjC8S2mx0nAel650lVecTBPYlZjfyk8hGw2\r\nvPXxaGcfEWbfoD+KBTKS/cPSmHxNAuVDXkTVX+cfTGvPkRfFq7vHdmp4tvC2\r\n+OCcXYOEK3RNy+YLnlp+5VHx7CIpeYAp3ntUdmF+K1q0B+T5FNNWbpRli/v3\r\n2XqQ+G8N0eiPtkmEjllGmU5ECW2cur0o/hhhgOyrZAjXx6sBcR44V9zVQsFZ\r\nALVBiUTkv1dwO5XiMn4tdu6Wfo3mjT5keD8Po6jIGZ/adlql/yejRBWQDS03\r\nSYTnsQ1X431k9BUeatpcDD6A437AoV1NaXqpeGb3v6LRS6mWxiBvm/eC8mq9\r\nQr6Yv8N9CmV4Y82xxPt21bZ7UiKxDX964M8akV3zcP3PTTcmL7hXquZEWod5\r\ncMzRWDVG8osb+ZBl+KE+nkiNicYbKxN5HI0=\r\n=otVa\r\n-----END PGP SIGNATURE-----\r\n"},"type":"module","types":"./index.d.ts","svelte":"./index.js","exports":{".":"./index.js","./package.json":"./package.json","./AnimatedCounter.svelte":"./AnimatedCounter.svelte"},"gitHead":"3293d9a44519a2326a0cf8bacb3514a3b558f8b2","_npmUser":{"name":"benzara","email":"benzara.tahar@gmail.com"},"repository":{"url":"git+https://github.com/benzara-tahar/svelte-animated-counter.git","type":"git"},"_npmVersion":"8.5.5","description":"A tiny ( < 2Kb ) animated counter component for svelte","directories":{},"_nodeVersion":"16.15.0","_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.3.1","eslint":"^8.12.0","svelte":"^3.46.0","prettier":"^2.5.1","svelte2tsx":"^0.5.9","typescript":"~4.6.2","svelte-check":"^2.2.6","@sveltejs/kit":"next","@types/cookie":"^0.4.1","@playwright/test":"^1.21.0","svelte-preprocess":"^4.10.1","eslint-plugin-svelte3":"^4.0.0","@sveltejs/adapter-auto":"next","eslint-config-prettier":"^8.3.0","prettier-plugin-svelte":"^2.5.0","@typescript-eslint/parser":"^5.10.1","@typescript-eslint/eslint-plugin":"^5.10.1"},"_npmOperationalInternal":{"tmp":"tmp/svelte-animated-counter_0.0.3_1661112102656_0.9484000549610629","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-05-11T06:20:18.058Z","modified":"2024-11-19T09:08:31.020Z","0.0.1":"2022-05-10T18:45:16.497Z","0.0.2":"2022-05-10T19:13:02.289Z","0.1.0":"2022-05-11T06:20:18.275Z","0.0.3":"2022-08-21T20:01:42.817Z"},"bugs":{"url":"https://github.com/benzara-tahar/svelte-animated-counter/issues"},"author":{"url":"https://benzara.me","name":"Benzara Tahar Benlahcene","email":"benzara.tahar@gmail.com"},"homepage":"https://svelte-animated-counter.vercel.app","keywords":["countdown","countup","counter","animated","timer","svelte"],"repository":{"url":"git+https://github.com/benzara-tahar/svelte-animated-counter.git","type":"git"},"description":"A tiny ( < 2Kb ) animated counter component for svelte","maintainers":[{"email":"benzara.tahar@gmail.com","name":"lahcene"}],"readme":"# svelte-animated-counter\n\nA tiny css-agnostic animated counter for Svelte\n\n## Installation 🔧\n\nnpm (or any other package manager)\n\n```sh\nnpm install -D @benzara/svelte-animated-counter\n```\n\n## Features ✨\n\n- No dependencies\n- CSS agnostic (custom styling)\n- less than 1Kb minified\n- works for svelte and svelte-kit\n- Customisable (see options below)\n\n## How to use 🚀\n\n1. First import the component on your svelte page's script section.\n\n```js\nimport { AnimatedCounter } from '@benzara/svelte-animated-counter';\n```\n\n2. Call the component where you want it to be placed e.g.:\n\n```jsx\n<AnimatedCounter\n\tvalues={Array.from({ length: 122 }, (_, i) => (1900 + i).toString())}\n\tclass=\"custom-counter\"\n\tinterval={1000}\n\tstartImmediately={false}\n\tdirection=\"down\"\n\tloop={true}\n\tease=\"cubic-bezier(0.25, 0.1, 0.25, 1)\"\n\tinitialValue=\"2008\"\n/>\n```\n\n### Configuration Options\n\n| Name             | Default                    | Description                                                                                         |\n| ---------------- | -------------------------- | --------------------------------------------------------------------------------------------------- |\n| values           | `['000',..., '100']`       | list of values to animate                                                                           |\n| interval         | `1000`                     | counter interval between each step in milliseconds, defaults to `1000`                              |\n| startImmediately | `false`                    | whether to start the counter immediately or wait for the `interval` to pass, defaults to `false`    |\n| direction        | 'down'                     | counter direction, can be `up` or `down` defaults to `down`                                         |\n| loop             | `true`                     | whether to loop the counter animation after reaching the end of `values` array , defaults to `true` |\n| ease             | `cubic-bezier(1, 0, 0, 1)` | easing function to use, defaults to `cubic-bezier(1, 0, 0, 1)`                                      |\n| initialValue     | `undefined`                | optional initial value to start the counter from. If not provided, `initlaValue` will be the first item in the `values array` if `direction` === `\"up\"`, or the last item otherwise | \n## Contribution 🖇️\n\nFeel free to fork. If you find a bug or got something great to add make a pull request!\n\n## Authors ✒️\n\n**Benzara Tahar Benlahcene**\n[benzara-tahar](https://github.com/benzara-tahar)\n\nYou can also look at the list of all the [contributors](https://github.com/benzara-tahar/svelte-animated-counter/contributors) who have participated in this project.\n\n## License 📄\n\nThis project is free to use, edit & distribute under the MIT License.\n\n---\n\n⌨️ with ❤️ by [benzara-tahar](https://github.com/benzara-tahar) 😊\n","readmeFilename":"README.md"}