{"id":19658117,"url":"https://github.com/cdaringe/perish","last_synced_at":"2025-09-05T19:49:30.743Z","repository":{"id":9078005,"uuid":"60745383","full_name":"cdaringe/perish","owner":"cdaringe","description":"tiny module to log and exit on uncaughtException and unhandledRejection events","archived":false,"fork":false,"pushed_at":"2024-08-05T18:42:05.000Z","size":796,"stargazers_count":2,"open_issues_count":23,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T16:02:50.370Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdaringe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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-06-09T02:49:18.000Z","updated_at":"2020-02-02T03:55:33.000Z","dependencies_parsed_at":"2023-10-12T05:41:24.703Z","dependency_job_id":"b346ff67-a272-480e-8a00-dfbbc4fc3ab0","html_url":"https://github.com/cdaringe/perish","commit_stats":{"total_commits":26,"total_committers":5,"mean_commits":5.2,"dds":0.5769230769230769,"last_synced_commit":"d59d28e86b34455a0ae9809741c0e7e834a93323"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fperish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fperish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fperish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Fperish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdaringe","download_url":"https://codeload.github.com/cdaringe/perish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251383646,"owners_count":21580915,"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-11-11T15:36:09.257Z","updated_at":"2025-04-28T20:31:10.483Z","avatar_url":"https://github.com/cdaringe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# perish\n\n[![Codeship Status for cdaringe/perish](https://codeship.com/projects/4ce16a00-107f-0134-12ce-2a42c1ba701a/status?branch=master)](https://codeship.com/projects/157001)\n[![Coverage Status](https://coveralls.io/repos/github/cdaringe/perish/badge.svg?branch=master)](https://coveralls.io/github/cdaringe/perish?branch=master)\n![](https://img.shields.io/badge/standardjs-%E2%9C%93-brightgreen.svg)\n[![TypeScript package](https://img.shields.io/badge/language-typescript-blue.svg)](https://www.typescriptlang.org)\n\ntiny module to log and exit on uncaughtException and unhandledRejection events\n\n## install\n\n`npm install --save(-dev) perish`\n\n## usage\n\n`require('perish')`\n\nthat's all.  in any nodejs file.\n\n## what\n\nlisten for `uncaughtException` \u0026 `unhandledRejection` in node processes.  when those events occur, log the message and the stack, then exit with exit code `1`.\n\n## why\n\nbecause apps should die hard if their errors aren't handled.  some apps require graceful exit onerror.  sometimes this is feasible, sometimes this is not.  this package is simple and just exits.\n\n## example\n```js\n// unhandled.js\nPromise.reject(new Error('bananas'))\n```\n\nrun `node unhandled.js` and ... nothing.\n\n```js\n// handled.js\nrequire('perish')\nPromise.reject(new Error('bananas'))\n```\n\nrun `node handled.js` and:\n\n```js\nError: bananas\n    at Object.\u003canonymous\u003e (/some/path/handled.js:2:16)\n    at Module._compile (module.js:541:32)\n    at Object.Module._extensions..js (module.js:550:10)\n    at Module.load (module.js:458:32)\n    at tryModuleLoad (module.js:417:12)\n    at Function.Module._load (module.js:409:3)\n    at Function.Module.runMain (module.js:575:10)\n    at startup (node.js:160:18)\n    at node.js:456:3\n\n```\n\nnothin' too fancy!\n\n## api\n\n```js\nconst perish = require('perish')\nperish.printStacktrace // default true. set to false to console.error error message only\nperish.fail // @private. this is the error handler\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Fperish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdaringe%2Fperish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Fperish/lists"}