{"id":22308802,"url":"https://github.com/ratson/promise-exit","last_synced_at":"2025-03-26T01:29:02.152Z","repository":{"id":57331315,"uuid":"75294884","full_name":"ratson/promise-exit","owner":"ratson","description":"Run process.exit() after a promise has finished.","archived":false,"fork":false,"pushed_at":"2017-11-19T13:00:21.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-02T06:49:16.138Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ratson.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-12-01T13:26:04.000Z","updated_at":"2020-08-16T11:03:07.000Z","dependencies_parsed_at":"2022-08-29T08:10:44.671Z","dependency_job_id":null,"html_url":"https://github.com/ratson/promise-exit","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fpromise-exit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fpromise-exit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fpromise-exit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ratson%2Fpromise-exit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ratson","download_url":"https://codeload.github.com/ratson/promise-exit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245571301,"owners_count":20637317,"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-03T20:15:24.342Z","updated_at":"2025-03-26T01:29:02.124Z","avatar_url":"https://github.com/ratson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# promise-exit\n\nRun `process.exit()` after a promise function has completed.\n\n## Installation\n\n```\nnpm install promise-exit --save-dev\n```\n\n## Usage\n\n```js\nconst exit = require('promise-exit')\n\nfunction main() {\n  return Promise.resolve('Hello World!')\n}\n\nif (require.main === module) {\n  exit(main)\n\n  // custom error exit code, default to `1`\n  exit(main, { errorCode: 255 })\n\n  // do not print traceback, default to `true`\n  exit(main, { trace: false })\n\n  // pass arguments to function\n  exit(main(process.argv))\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratson%2Fpromise-exit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fratson%2Fpromise-exit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratson%2Fpromise-exit/lists"}