{"id":24030502,"url":"https://github.com/callmecavs/ique","last_synced_at":"2025-04-19T11:41:44.147Z","repository":{"id":57146958,"uuid":"122690742","full_name":"callmecavs/ique","owner":"callmecavs","description":"A queue that runs tasks when the browser is idle.","archived":false,"fork":false,"pushed_at":"2018-02-26T21:20:36.000Z","size":42,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T06:01:43.414Z","etag":null,"topics":["queue","requestidlecallback"],"latest_commit_sha":null,"homepage":"","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/callmecavs.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":"2018-02-24T01:30:11.000Z","updated_at":"2024-12-15T15:04:38.000Z","dependencies_parsed_at":"2022-09-06T13:02:16.448Z","dependency_job_id":null,"html_url":"https://github.com/callmecavs/ique","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/callmecavs%2Fique","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callmecavs%2Fique/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callmecavs%2Fique/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/callmecavs%2Fique/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/callmecavs","download_url":"https://codeload.github.com/callmecavs/ique/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249685296,"owners_count":21310578,"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":["queue","requestidlecallback"],"created_at":"2025-01-08T17:44:35.956Z","updated_at":"2025-04-19T11:41:44.119Z","avatar_url":"https://github.com/callmecavs.png","language":"JavaScript","readme":"# ique\n\n[![ique on NPM](https://img.shields.io/npm/v/ique.svg?style=flat-square)](https://www.npmjs.com/package/ique) [![ique Downloads on NPM](https://img.shields.io/npm/dm/ique.svg?style=flat-square)](https://www.npmjs.com/package/ique) [![Standard JavaScript Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)\n\nA queue that runs tasks when the browser is idle.\n\n## Install\n\n```sh\n$ npm install ique --save\n```\n\n## Use\n\n```javascript\nimport ique from 'ique'\n\n// create a queue, passing a timeout (default shown)\n// more on timeouts here: https://goo.gl/4jLPWz\nconst queue = ique(1000)\n\n// add tasks to it, which will be run automatically when the browser is idle\nfor (let i = 0; i \u003c 1000; i++) {\n  queue.add({\n    func: x =\u003e console.log(x),\n    args: ['test']\n  })\n}\n\n// constructor and add can be chained\nconst priorityQueue = ique(100)\n  .add({\n    func: x =\u003e console.log(x),\n    args: [0]\n  })\n  .add({\n    func: y =\u003e console.log(y),\n    args: [1]\n  })\n```\n\n## Browser Support\n\nRequires [`requestIdleCallback`](https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback), and as such supports the following:\n\n* Chrome 47+\n* Firefox 55+\n* Opera 34+\n\nConsider using this [shim](https://gist.github.com/paullewis/55efe5d6f05434a96c36) in unsupported browsers.\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT). © 2018 Michael Cavalea\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallmecavs%2Fique","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcallmecavs%2Fique","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcallmecavs%2Fique/lists"}