{"id":29723413,"url":"https://github.com/lucacicada/voidlib","last_synced_at":"2026-05-17T17:42:10.972Z","repository":{"id":305466294,"uuid":"1021053659","full_name":"lucacicada/voidlib","owner":"lucacicada","description":"Collection of useful libraries for JavaScript and TypeScript","archived":false,"fork":false,"pushed_at":"2025-07-20T09:37:50.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-20T09:48:58.564Z","etag":null,"topics":["node","support","utils","walk"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/voidlib","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/lucacicada.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,"zenodo":null}},"created_at":"2025-07-16T20:03:07.000Z","updated_at":"2025-07-20T09:37:48.000Z","dependencies_parsed_at":"2025-07-20T09:59:11.602Z","dependency_job_id":null,"html_url":"https://github.com/lucacicada/voidlib","commit_stats":null,"previous_names":["lucacicada/voidlib"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/lucacicada/voidlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fvoidlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fvoidlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fvoidlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fvoidlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucacicada","download_url":"https://codeload.github.com/lucacicada/voidlib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucacicada%2Fvoidlib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266886766,"owners_count":24001061,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["node","support","utils","walk"],"created_at":"2025-07-24T18:33:29.652Z","updated_at":"2026-05-17T17:42:00.960Z","avatar_url":"https://github.com/lucacicada.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# voidlib\n\nCollection of useful libraries for JavaScript and TypeScript.\n\nMost notably:\n\n## nonNullable\u003cT\u003e\n\nUseful function to filter out `null` and `undefined` values from a type.\n\n```ts\nimport { nonNullable } from 'voidlib'\n\narr.filter(nonNullable) // arr is now of type T[]\n```\n\n## walk\n\nPowerful utility to walk through directories and files in a given path.\n\n```ts\nimport { walk } from 'voidlib/node'\n\nfor await (const file of walk('/path/to/dir', {\n  recursive: true,\n\n  // Only yield files, nothing else\n  include: entry =\u003e entry.isFile() \u0026\u0026 entry.name.endsWith('.ts'),\n\n  // Do not recurse into hidden directories\n  recurse: entry =\u003e !entry.name.startsWith('.'),\n})) {\n  console.log(file) // file is a TypeScript (.ts) file\n}\n```\n\n## deferPromise\n\nCreate a deferred promise that can be resolved or rejected later.\n\n```ts\nconst p = deferPromise()\n\np.resolve('Hello, world!')\nawait p.promise // 'Hello, world!'\n```\n\n## task\n\nUnwrap an inlined promise, return a promise task that can be awaited.\n\n```ts\nconst t = task()\np.resolve('Hello, world!')\nawait p // 'Hello, world!'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacicada%2Fvoidlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucacicada%2Fvoidlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucacicada%2Fvoidlib/lists"}