{"id":16473112,"url":"https://github.com/binki/promise-delay-ts","last_synced_at":"2026-05-09T20:40:53.873Z","repository":{"id":57331301,"uuid":"139796078","full_name":"binki/promise-delay-ts","owner":"binki","description":"Simple Promise-returning delay()","archived":false,"fork":false,"pushed_at":"2019-05-15T14:56:16.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-11T03:07:40.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/binki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-05T04:49:09.000Z","updated_at":"2019-05-15T14:56:00.000Z","dependencies_parsed_at":"2022-08-23T14:41:13.628Z","dependency_job_id":null,"html_url":"https://github.com/binki/promise-delay-ts","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/binki%2Fpromise-delay-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2Fpromise-delay-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2Fpromise-delay-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binki%2Fpromise-delay-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binki","download_url":"https://codeload.github.com/binki/promise-delay-ts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241110899,"owners_count":19911410,"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-11T12:25:22.208Z","updated_at":"2026-05-09T20:40:53.834Z","avatar_url":"https://github.com/binki.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Very simple delay with TypeScript typing which may be consumed by JavaScript.\n\n# Usage\n\nThis is an ES module which may consumed from TypeScript or JavaScript.\nNote that if you are consuming it via commonjs `require()`, the function will be available on the `default` export.\n\n```ts\nimport delay from 'promise-delay-ts';\n\n(async () =\u003e {\n  console.log(new Date());\n  await delay(1000);\n  console.log(new Date());\n})();\n```\n\nTo import in pure nodejs/commonjs, be sure to import the `default` property:\n\n```js\nconst {\n  default: delay,\n} = require('promise-delay-ts');\n\n(async () =\u003e {\n  console.log(new Date());\n  await delay(1000);\n  console.log(new Date());\n})();\n```\n\n# API\n\n## `delay(delay:number):Promise\u003cvoid\u003e`:\n\n* `delay`: delay in milliseconds\n\nReturns a `Promise\u003cvoid\u003e` which will resolve after the delay.\nThe resolved value will be `undefined`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinki%2Fpromise-delay-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinki%2Fpromise-delay-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinki%2Fpromise-delay-ts/lists"}