{"id":13447820,"url":"https://github.com/jamiebuilds/tickedoff","last_synced_at":"2025-04-07T08:26:27.436Z","repository":{"id":57377104,"uuid":"126867867","full_name":"jamiebuilds/tickedoff","owner":"jamiebuilds","description":"Tiny library (\u003c200B gzip) for deferring something by a \"tick\"","archived":false,"fork":false,"pushed_at":"2023-06-13T09:55:04.000Z","size":32,"stargazers_count":217,"open_issues_count":2,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T07:07:33.761Z","etag":null,"topics":["async","defer","javascript","nexttick","polyfill","ponyfill","promise","setimmediate","settimeout","sleep","wait"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"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/jamiebuilds.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-03-26T17:53:50.000Z","updated_at":"2025-02-11T21:33:56.000Z","dependencies_parsed_at":"2024-01-10T18:34:52.349Z","dependency_job_id":null,"html_url":"https://github.com/jamiebuilds/tickedoff","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"99129560b3b788188c575f907488a3922b17e604"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Ftickedoff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Ftickedoff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Ftickedoff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamiebuilds%2Ftickedoff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamiebuilds","download_url":"https://codeload.github.com/jamiebuilds/tickedoff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247617330,"owners_count":20967582,"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":["async","defer","javascript","nexttick","polyfill","ponyfill","promise","setimmediate","settimeout","sleep","wait"],"created_at":"2024-07-31T05:01:27.653Z","updated_at":"2025-04-07T08:26:27.416Z","avatar_url":"https://github.com/jamiebuilds.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Node.js Features","📦 Legacy \u0026 Inactive Projects"],"sub_categories":[],"readme":"# tickedoff\n\n\u003e Tiny library (\u003c200B gzip) for deferring something by a \"tick\"\n\n- Using `setTimeout` is actually a bit slow because its clamped to 4ms\n- `setImmediate` is not available in most places (and probably never will be)\n- `process.nextTick` is only in Node\n- `Promise#then` needs polyfills in places\n- `tickedoff` uses whatever the best available option is\n- There are more robust libraries/polyfills but they are larger in size\n- This is all especially good for libraries to use\n\n## Install\n\n```sh\nyarn add tickedoff\n```\n\n## Usage\n\n```js\nconst defer = require('tickedoff');\n\nconsole.log(1);\ndefer(() =\u003e console.log(3));\nconsole.log(2);\n// 1\n// 2\n// 3\n```\n\n## Perf\n\n```sh\n$ node perf.js\nprocess.nextTick x 10000 = 24ms\nPromise#then x 10000 = 29ms\nsetImmediate x 10000 = 68ms\nsetTimeout x 10000 = 13506ms\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiebuilds%2Ftickedoff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamiebuilds%2Ftickedoff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamiebuilds%2Ftickedoff/lists"}