{"id":18217345,"url":"https://github.com/alsotang/forceinterval","last_synced_at":"2025-04-07T21:43:48.279Z","repository":{"id":57240067,"uuid":"67016900","full_name":"alsotang/forceinterval","owner":"alsotang","description":"auto execute omitted setInterval cycle","archived":false,"fork":false,"pushed_at":"2016-08-31T09:22:09.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T03:19:00.606Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alsotang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-31T08:03:43.000Z","updated_at":"2016-08-31T08:14:45.000Z","dependencies_parsed_at":"2022-09-05T08:21:33.327Z","dependency_job_id":null,"html_url":"https://github.com/alsotang/forceinterval","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsotang%2Fforceinterval","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsotang%2Fforceinterval/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsotang%2Fforceinterval/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alsotang%2Fforceinterval/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alsotang","download_url":"https://codeload.github.com/alsotang/forceinterval/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737071,"owners_count":20987713,"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":[],"created_at":"2024-11-03T17:04:58.083Z","updated_at":"2025-04-07T21:43:48.225Z","avatar_url":"https://github.com/alsotang.png","language":"JavaScript","readme":"## forceinterval\n\nAuto execute omitted `setInterval` cycle\n\n## install\n\n`npm install forceinterval`\n\n## description\n\nFor many webpage, we have some `setInterval` logic in it, but sometimes some heavy compute occurs, then the `setInterval` logic would show wrong result for us. Such as clock chart, or some animation.\n\n`forceInterval` can replace `setInterval` in many scenes seamlessly, and its usecase is common. So I hope this function can be added in lodash.\n\n## example\n\n```js\nvar forceinterval = require('forceinterval')\nvar count = 0;\n\nforceinterval(function addTask() {\n  count++;\n}, 100)\n\nvar startTime = +new Date()\nwhile ((new Date - startTime) \u003c 1000) {}\n\nsetTimeout(function () {\n  // !!!This is the point. After block,\n  // forceinterval auto run `addTask` 10 times.\n  assert(count == 10)\n  done()\n}, 50)\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsotang%2Fforceinterval","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falsotang%2Fforceinterval","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falsotang%2Fforceinterval/lists"}