{"id":15707037,"url":"https://github.com/calebboyd/aceink","last_synced_at":"2025-05-12T19:14:24.554Z","repository":{"id":9693054,"uuid":"63009547","full_name":"calebboyd/aceink","owner":"calebboyd","description":"Async things that are useful","archived":false,"fork":false,"pushed_at":"2023-09-13T01:34:03.000Z","size":1124,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T19:14:18.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/calebboyd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-10T17:08:51.000Z","updated_at":"2023-05-18T06:21:23.000Z","dependencies_parsed_at":"2024-06-19T01:35:29.273Z","dependency_job_id":"ee87eabd-e923-42dc-a533-57ed9d2477b6","html_url":"https://github.com/calebboyd/aceink","commit_stats":null,"previous_names":["calebboyd/async"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebboyd%2Faceink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebboyd%2Faceink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebboyd%2Faceink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/calebboyd%2Faceink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/calebboyd","download_url":"https://codeload.github.com/calebboyd/aceink/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253805844,"owners_count":21967054,"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-10-03T20:33:02.084Z","updated_at":"2025-05-12T19:14:24.522Z","avatar_url":"https://github.com/calebboyd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## aceink\n\nUseful async tools.\n\n- `createLock`\n  - a simple counting sempahore\n- `createDeferred`\n  - simple deferred promise\n- `q`\n  - a concurrent work queue\n- `each`, `map`\n  - *optionally* concurrent iteration functions\n- `gowait`\n  - convert a promise or promise returning function to `[error,result]` tuples\n- `delay`\n  - delay ms, optionally resolve an argument\n- `noop`, `identity`, `once`\n  - Other useful language functions\n\nGet it on npm: `npm install aceink`\n\nSee the generated documentation [here](/docs/modules.md)\n\n---\n### Example (queue)\n\n```javascript\nimport { q } from 'aceink'\n\nconst { ready, add, empty } = q(10)\n\nfunction fetchQux(bar) {\n  return fetch(`https://example.com/${bar}`)\n}\n\nfor (const foo of Array(100).keys()) {\n  await ready()\n  add(fetchQux, foo)\n}\nreturn empty()\n\n```\n\n### Example (gowait)\n\n```javascript\nimport { gowait, delay } from 'aceink'\n\nconst [err, value] = await gowait(delay(100, 42))\nconsole.log(value) //42\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebboyd%2Faceink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalebboyd%2Faceink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalebboyd%2Faceink/lists"}