{"id":22092207,"url":"https://github.com/pirxpilot/zaraz","last_synced_at":"2025-03-23T23:45:29.261Z","repository":{"id":41416639,"uuid":"106104685","full_name":"pirxpilot/zaraz","owner":"pirxpilot","description":"Cheap way to introduce short async delay. :watch:","archived":false,"fork":false,"pushed_at":"2024-03-29T16:02:23.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-01T00:48:38.011Z","etag":null,"topics":[],"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/pirxpilot.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","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":"2017-10-07T14:36:36.000Z","updated_at":"2024-03-29T02:21:45.000Z","dependencies_parsed_at":"2022-09-17T14:42:13.244Z","dependency_job_id":null,"html_url":"https://github.com/pirxpilot/zaraz","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/pirxpilot%2Fzaraz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fzaraz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fzaraz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pirxpilot%2Fzaraz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pirxpilot","download_url":"https://codeload.github.com/pirxpilot/zaraz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186926,"owners_count":20574554,"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-12-01T03:08:45.699Z","updated_at":"2025-03-23T23:45:29.239Z","avatar_url":"https://github.com/pirxpilot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![NPM version][npm-image]][npm-url]\n[![Build Status][build-image]][build-url]\n[![Dependency Status][deps-image]][deps-url]\n\n# zaraz\n\nCheap way to introduce short async delay.\n\n## Install\n\n```sh\n$ npm install --save zaraz\n```\n\n## Usage\n\n```js\nconst zaraz = require('zaraz');\n\nfunction sum(a, b) {\n  console.log(a + b);\n}\n\nzaraz(sum, 5, 7); // will display 13 after a short delay\nzaraz(sum, 10, 10); // will displey 20 after it displays 13\n\n```\n\n\n## API\n\n### `zaraz(fn, ...args)`\n\n  schedule `fn` to be called in near future - `args` will be passed to `fn`\n\n### `zaraz.DELAY`\n\n  minumum delay before task is processed - 10 millis by default\n\n### `zaraz.ACTIVE`\n\n  maximum time spent processing taks queue before yielding - 100 millis by default\n\n### `zaraz.MAX_ITEMS`\n\n  maximum number of task processed before yielding - 1000 by default\n\n## License\n\nMIT © [Damian Krzeminski](https://pirxpilot.me)\n\n[npm-image]: https://img.shields.io/npm/v/zaraz\n[npm-url]: https://npmjs.org/package/zaraz\n\n[build-url]: https://github.com/pirxpilot/zaraz/actions/workflows/check.yaml\n[build-image]: https://img.shields.io/github/actions/workflow/status/pirxpilot/zaraz/check.yaml?branch=main\n\n[deps-image]: https://img.shields.io/librariesio/release/npm/zaraz\n[deps-url]: https://libraries.io/npm/zaraz\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fzaraz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpirxpilot%2Fzaraz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpirxpilot%2Fzaraz/lists"}