{"id":724,"url":"https://github.com/ehmicky/human-signals","last_synced_at":"2025-05-14T04:07:59.237Z","repository":{"id":35161964,"uuid":"214467546","full_name":"ehmicky/human-signals","owner":"ehmicky","description":"Human-friendly process signals","archived":false,"fork":false,"pushed_at":"2025-03-29T02:43:42.000Z","size":8132,"stargazers_count":280,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-03T03:09:50.964Z","etag":null,"topics":["error-handling","es6","exit","exitcode","handlers","interrupts","irq","javascript","linux","macos","nodejs","operating-system","process","sigint","signal","signals","sigterm","status","typescript","windows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ehmicky.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-10-11T15:13:49.000Z","updated_at":"2025-03-29T02:43:45.000Z","dependencies_parsed_at":"2023-02-19T11:31:39.357Z","dependency_job_id":"b30b8868-5eaf-4e91-a545-8ec09c27e82c","html_url":"https://github.com/ehmicky/human-signals","commit_stats":{"total_commits":673,"total_committers":5,"mean_commits":134.6,"dds":"0.025260029717682042","last_synced_commit":"434eb8f44c71714339726f1dda9f0b2c03182604"},"previous_names":["ehmicky/human-signal"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehmicky%2Fhuman-signals","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehmicky%2Fhuman-signals/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehmicky%2Fhuman-signals/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ehmicky%2Fhuman-signals/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ehmicky","download_url":"https://codeload.github.com/ehmicky/human-signals/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254049398,"owners_count":22006046,"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":["error-handling","es6","exit","exitcode","handlers","interrupts","irq","javascript","linux","macos","nodejs","operating-system","process","sigint","signal","signals","sigterm","status","typescript","windows"],"created_at":"2024-01-05T20:15:29.779Z","updated_at":"2025-05-14T04:07:59.204Z","avatar_url":"https://github.com/ehmicky.png","language":"JavaScript","readme":"[![Node](https://img.shields.io/badge/-Node.js-808080?logo=node.js\u0026colorA=404040\u0026logoColor=66cc33)](https://www.npmjs.com/package/human-signals)\n[![TypeScript](https://img.shields.io/badge/-Typed-808080?logo=typescript\u0026colorA=404040\u0026logoColor=0096ff)](/src/main.d.ts)\n[![Codecov](https://img.shields.io/badge/-Tested%20100%25-808080?logo=codecov\u0026colorA=404040)](https://codecov.io/gh/ehmicky/human-signals)\n[![Mastodon](https://img.shields.io/badge/-Mastodon-808080.svg?logo=mastodon\u0026colorA=404040\u0026logoColor=9590F9)](https://fosstodon.org/@ehmicky)\n[![Medium](https://img.shields.io/badge/-Medium-808080.svg?logo=medium\u0026colorA=404040)](https://medium.com/@ehmicky)\n\nHuman-friendly process signals.\n\nThis is a map of known process signals with some information about each signal.\n\nUnlike\n[`os.constants.signals`](https://nodejs.org/api/os.html#os_signal_constants)\nthis includes:\n\n- human-friendly [descriptions](#description)\n- [default actions](#action), including whether they [can be prevented](#forced)\n- whether the signal is [supported](#supported) by the current OS\n\n# Example\n\n```js\nimport { signalsByName, signalsByNumber } from 'human-signals'\n\nconsole.log(signalsByName.SIGINT)\n// {\n//   name: 'SIGINT',\n//   number: 2,\n//   description: 'User interruption with CTRL-C',\n//   supported: true,\n//   action: 'terminate',\n//   forced: false,\n//   standard: 'ansi'\n// }\n\nconsole.log(signalsByNumber[8])\n// {\n//   name: 'SIGFPE',\n//   number: 8,\n//   description: 'Floating point arithmetic error',\n//   supported: true,\n//   action: 'core',\n//   forced: false,\n//   standard: 'ansi'\n// }\n```\n\n# Install\n\n```bash\nnpm install human-signals\n```\n\nThis package works in Node.js \u003e=18.18.0.\n\nThis is an ES module. It must be loaded using\n[an `import` or `import()` statement](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c),\nnot `require()`. If TypeScript is used, it must be configured to\n[output ES modules](https://www.typescriptlang.org/docs/handbook/esm-node.html),\nnot CommonJS.\n\n# Usage\n\n## signalsByName\n\n_Type_: `object`\n\nObject whose keys are signal [names](#name) and values are\n[signal objects](#signal).\n\n## signalsByNumber\n\n_Type_: `object`\n\nObject whose keys are signal [numbers](#number) and values are\n[signal objects](#signal).\n\n## signal\n\n_Type_: `object`\n\nSignal object with the following properties.\n\n### name\n\n_Type_: `string`\n\nStandard name of the signal, for example `'SIGINT'`.\n\n### number\n\n_Type_: `number`\n\nCode number of the signal, for example `2`. While most `number` are\ncross-platform, some are different between different OS.\n\n### description\n\n_Type_: `string`\n\nHuman-friendly description for the signal, for example\n`'User interruption with CTRL-C'`.\n\n### supported\n\n_Type_: `boolean`\n\nWhether the current OS can handle this signal in Node.js using\n[`process.on(name, handler)`](https://nodejs.org/api/process.html#process_signal_events).\n\nThe list of supported signals\n[is OS-specific](https://github.com/ehmicky/cross-platform-node-guide/blob/main/docs/6_networking_ipc/signals.md#cross-platform-signals).\n\n### action\n\n_Type_: `string`\\\n_Enum_: `'terminate'`, `'core'`, `'ignore'`, `'pause'`, `'unpause'`\n\nWhat is the default action for this signal when it is not handled.\n\n### forced\n\n_Type_: `boolean`\n\nWhether the signal's default action cannot be prevented. This is `true` for\n`SIGTERM`, `SIGKILL` and `SIGSTOP`.\n\n### standard\n\n_Type_: `string`\\\n_Enum_: `'ansi'`, `'posix'`, `'bsd'`, `'systemv'`, `'other'`\n\nWhich standard defined that signal.\n\n# Support\n\nFor any question, _don't hesitate_ to [submit an issue on GitHub](../../issues).\n\nEveryone is welcome regardless of personal background. We enforce a\n[Code of conduct](CODE_OF_CONDUCT.md) in order to promote a positive and\ninclusive environment.\n\n# Contributing\n\nThis project was made with ❤️. The simplest way to give back is by starring and\nsharing it online.\n\nIf the documentation is unclear or has a typo, please click on the page's `Edit`\nbutton (pencil icon) and suggest a correction.\n\nIf you would like to help us fix a bug or add a new feature, please check our\n[guidelines](CONTRIBUTING.md). Pull requests are welcome!\n\nThanks go to our wonderful contributors:\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://fosstodon.org/@ehmicky\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/8136211?v=4?s=100\" width=\"100px;\" alt=\"ehmicky\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eehmicky\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/ehmicky/human-signals/commits?author=ehmicky\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#design-ehmicky\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"#ideas-ehmicky\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/ehmicky/human-signals/commits?author=ehmicky\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://www.electrovir.com\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/1205860?v=4?s=100\" width=\"100px;\" alt=\"electrovir\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eelectrovir\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/ehmicky/human-signals/commits?author=electrovir\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://fzy.se\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/2656517?v=4?s=100\" width=\"100px;\" alt=\"Felix Zedén Yverås\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eFelix Zedén Yverås\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/ehmicky/human-signals/commits?author=FelixZY\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/ehmicky/human-signals/commits?author=FelixZY\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n","funding_links":[],"categories":["JavaScript","Libraries"],"sub_categories":["Signals"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehmicky%2Fhuman-signals","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fehmicky%2Fhuman-signals","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fehmicky%2Fhuman-signals/lists"}