{"id":26449452,"url":"https://github.com/alireza29675/chaser","last_synced_at":"2025-03-18T14:57:43.823Z","repository":{"id":34982571,"uuid":"194081592","full_name":"Alireza29675/chaser","owner":"Alireza29675","description":"😼 JavaScript variable chaser","archived":false,"fork":false,"pushed_at":"2022-12-10T20:23:32.000Z","size":3363,"stargazers_count":3,"open_issues_count":19,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-09T10:03:55.894Z","etag":null,"topics":["chaser","easing","transition"],"latest_commit_sha":null,"homepage":"https://alireza29675.github.io/chaser/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alireza29675.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-27T11:18:41.000Z","updated_at":"2021-03-29T14:28:35.000Z","dependencies_parsed_at":"2023-01-15T11:26:56.153Z","dependency_job_id":null,"html_url":"https://github.com/Alireza29675/chaser","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":"Alireza29675/npm-package-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alireza29675%2Fchaser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alireza29675%2Fchaser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alireza29675%2Fchaser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alireza29675%2Fchaser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alireza29675","download_url":"https://codeload.github.com/Alireza29675/chaser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244246511,"owners_count":20422456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chaser","easing","transition"],"created_at":"2025-03-18T14:57:43.226Z","updated_at":"2025-03-18T14:57:43.804Z","avatar_url":"https://github.com/Alireza29675.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chaser\n\n![chaser](https://user-images.githubusercontent.com/2771377/60268250-400b2500-9901-11e9-8ab4-69478a4d9dc2.png)\n\nJavaScript variable chaser\n\n## Installation\n\n```bash\nnpm install --save chaser\n```\n\n## Usage\n\n```javascript\nconst chaser = require('chaser')\n\nconst myAnimatedVar = chaser(12) // 12 is our initial value here\nmyAnimateVar.target = 20\n\nsetInterval(() =\u003e {\n    console.log(myAnimatedVar.value) // You can use .value anywhere and it will be generated accurately by timing function and passed time.\n}, 10)\n```\n\n## Chaser using React Hooks with `useChaser`\n\n```javascript\nimport { useChaser } from 'chaser'\n\nfunction MovingBox() {\n    const [posX, setPosX] = useChaser(0 /* initialValue */)\n\n    return (\n        \u003cdiv style={{ transform: `translateX(${posX}px)` }}\u003e\n            \u003cbutton onClick={() =\u003e setPosX(Math.random() * 100)} /\u003e\n        \u003c/div\u003e\n    )\n}\n```\n\n## Example\n\nIf you're looking for an example, here's a unclean example! but works:\n[https://alireza29675.github.io/chaser/](https://alireza29675.github.io/chaser/)\n\n## Contribute\n\nPut issues! Suggest me what you need.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falireza29675%2Fchaser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falireza29675%2Fchaser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falireza29675%2Fchaser/lists"}