{"id":13826858,"url":"https://github.com/vaneenige/uot","last_synced_at":"2025-04-23T00:43:34.902Z","repository":{"id":57387026,"uuid":"164807467","full_name":"vaneenige/uot","owner":"vaneenige","description":"🦁 A tiny setTimeout alternative with progress.","archived":false,"fork":false,"pushed_at":"2020-03-11T11:24:33.000Z","size":6,"stargazers_count":44,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T00:43:26.985Z","etag":null,"topics":["observer","progress","requestanimationframe","timeout"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/uot","language":"JavaScript","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/vaneenige.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-01-09T07:02:06.000Z","updated_at":"2024-10-24T04:14:47.000Z","dependencies_parsed_at":"2022-09-15T02:51:42.579Z","dependency_job_id":null,"html_url":"https://github.com/vaneenige/uot","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaneenige%2Fuot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaneenige%2Fuot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaneenige%2Fuot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaneenige%2Fuot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaneenige","download_url":"https://codeload.github.com/vaneenige/uot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250348884,"owners_count":21415907,"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":["observer","progress","requestanimationframe","timeout"],"created_at":"2024-08-04T09:01:45.546Z","updated_at":"2025-04-23T00:43:34.885Z","avatar_url":"https://github.com/vaneenige.png","language":"JavaScript","readme":"# Update Over Time (uot)\n\n[![npm version](https://img.shields.io/npm/v/uot.svg)](https://www.npmjs.com/package/uot)\n[![gzip size](http://img.badgesize.io/https://unpkg.com/uot/dist/uot.mjs?compression=gzip)](https://unpkg.com/uot)\n[![license](https://img.shields.io/npm/l/uot.svg)](https://github.com/vaneenige/uot/blob/master/LICENSE)\n[![dependencies](https://img.shields.io/badge/dependencies-none-ff69b4.svg)](https://github.com/vaneenige/uot/blob/master/package.json)\n\nUpdate Over Time (uot) is a tiny library to provide the easiest way for updating values over time. Provide a callback and a duration you're ready to go!\n\nThis utility can be useful for CSS animations, DOM changes, WebGL transitions or anything that can be updated based on a progress value.\n\n\u003eIt's basically a setTimeout (or setInterval) with progress.\n\n#### Features:\n\n- Small in size, no dependencies\n- Based on requestAnimationFrame\n- Optimized for multiple instances\n\n## Install\n\n```\n$ npm install --save uot\n```\n\n## Usage\n\nImport the library:\n```js\nimport updateOverTime from 'uot';\n```\n\nProvide a callback and a duration:\n```js\nupdateOverTime((progress) =\u003e {\n  // Progress value: 0 ... 1\n  if (progress === 1) {\n    // Handle complete\n  }\n}, 2000);\n```\n\n\u003e As a third parameter an optional repeat count can be provided. \n\nUse the progress value to update the DOM (or anything):\n```js\nupdateOverTime((progress) =\u003e {\n  // Add easing to the progress value\n  progress = easeInOutQuad(progress);\n  // Output the progress value to the DOM\n  document.body.textContent = progress.toFixed(2);\n}, 4000);\n```\n\n\u003e At any given time only a single requestAnimationFrame will be called.\n\n## License\n\nMIT © \u003ca href=\"https://use-the-platform.com\"\u003eColin van Eenige\u003c/a\u003e\n\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaneenige%2Fuot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaneenige%2Fuot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaneenige%2Fuot/lists"}