{"id":23789957,"url":"https://github.com/blackglory/go","last_synced_at":"2026-05-15T18:01:59.369Z","repository":{"id":44955784,"uuid":"345405141","full_name":"BlackGlory/go","owner":"BlackGlory","description":"🌳","archived":false,"fork":false,"pushed_at":"2024-04-17T07:51:39.000Z","size":1119,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-03T15:53:02.787Z","etag":null,"topics":["browser","esm","library","nodejs","npm-package","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@blackglory/go","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/BlackGlory.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":"2021-03-07T17:10:06.000Z","updated_at":"2024-04-17T07:49:51.000Z","dependencies_parsed_at":"2024-04-17T08:47:43.317Z","dependency_job_id":"767f81d8-3f2c-4012-89a9-0af9ef555c74","html_url":"https://github.com/BlackGlory/go","commit_stats":{"total_commits":30,"total_committers":2,"mean_commits":15.0,"dds":0.2666666666666667,"last_synced_commit":"e492be9b896d3ae1dd7944059e530309db99cd4a"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackGlory%2Fgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackGlory","download_url":"https://codeload.github.com/BlackGlory/go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240018690,"owners_count":19734872,"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":["browser","esm","library","nodejs","npm-package","typescript"],"created_at":"2025-01-01T17:17:48.877Z","updated_at":"2026-05-15T18:01:59.362Z","avatar_url":"https://github.com/BlackGlory.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go\n## Install\n```sh\nnpm install --save @blackglory/go\n# or\nyarn add @blackglory/go\n```\n\n## Usage\n```ts\nimport { go } from '@blackglory/go'\n\ngo(async () =\u003e {\n  ...\n})\n```\n\n## Why?\n[IIFE] is good until you forget to invoke it:\n\n```ts\n;(async () =\u003e {\n  ...\n}) // oops!\n```\n\nThe semicolon-free style is good until you forget to add a semicolon before the IIFE:\n\n```ts\nconst arr = []\n\n// oops!\n(async () =\u003e {\n  ...\n})()\n```\n\n[IIFE]: https://en.wikipedia.org/wiki/Immediately_invoked_function_expression\n\n## API\n### go\n```ts\nfunction go\u003cT\u003e(fn: () =\u003e T): T\n```\n\n### goMicrotask\n```ts\nfunction goMicrotask\u003cT\u003e(fn: () =\u003e Awaitable\u003cT\u003e): Promise\u003cT\u003e\n```\n\n### goMacrotask\n```ts\nfunction goMacrotask\u003cT\u003e(fn: () =\u003e Awaitable\u003cT\u003e): Promise\u003cT\u003e\n```\n\n### goGenerator\n```ts\nfunction goGenerator\u003cYield, Next\u003e(\n  fn: () =\u003e\n  | void\n  | Generator\u003cYield, void, Next\u003e\n): Generator\u003cYield, void, Next\u003e\n```\n\n### goAsyncGenerator\n```ts\nfunction goAsyncGenerator\u003cYield, Next\u003e(\n  fn: () =\u003e\n  | void\n  | Generator\u003cYield, void, Next\u003e\n  | AsyncGenerator\u003cYield, void, Next\u003e\n): AsyncGenerator\u003cYield, void, Next\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackglory%2Fgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackglory%2Fgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackglory%2Fgo/lists"}