版博士V2.0程序
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. [![Node](https://img.shields.io/badge/-Node.js-808080?logo=node.js&colorA=404040&logoColor=66cc33)](https://www.npmjs.com/package/human-signals)
  2. [![TypeScript](https://img.shields.io/badge/-Typed-808080?logo=typescript&colorA=404040&logoColor=0096ff)](/src/main.d.ts)
  3. [![Codecov](https://img.shields.io/badge/-Tested%20100%25-808080?logo=codecov&colorA=404040)](https://codecov.io/gh/ehmicky/human-signals)
  4. [![Mastodon](https://img.shields.io/badge/-Mastodon-808080.svg?logo=mastodon&colorA=404040&logoColor=9590F9)](https://fosstodon.org/@ehmicky)
  5. [![Medium](https://img.shields.io/badge/-Medium-808080.svg?logo=medium&colorA=404040)](https://medium.com/@ehmicky)
  6. Human-friendly process signals.
  7. This is a map of known process signals with some information about each signal.
  8. Unlike
  9. [`os.constants.signals`](https://nodejs.org/api/os.html#os_signal_constants)
  10. this includes:
  11. - human-friendly [descriptions](#description)
  12. - [default actions](#action), including whether they [can be prevented](#forced)
  13. - whether the signal is [supported](#supported) by the current OS
  14. # Hire me
  15. Please
  16. [reach out](https://www.linkedin.com/feed/update/urn:li:activity:7018596298127781890/)
  17. if you're looking for a Node.js API or CLI engineer (10 years of experience).
  18. Most recently I have been [Netlify Build](https://github.com/netlify/build)'s
  19. and [Netlify Plugins](https://www.netlify.com/products/build/plugins/)'
  20. technical lead for 2.5 years. I am available for full-time remote positions in
  21. either US or EU time zones.
  22. # Example
  23. ```js
  24. import { signalsByName, signalsByNumber } from 'human-signals'
  25. console.log(signalsByName.SIGINT)
  26. // {
  27. // name: 'SIGINT',
  28. // number: 2,
  29. // description: 'User interruption with CTRL-C',
  30. // supported: true,
  31. // action: 'terminate',
  32. // forced: false,
  33. // standard: 'ansi'
  34. // }
  35. console.log(signalsByNumber[8])
  36. // {
  37. // name: 'SIGFPE',
  38. // number: 8,
  39. // description: 'Floating point arithmetic error',
  40. // supported: true,
  41. // action: 'core',
  42. // forced: false,
  43. // standard: 'ansi'
  44. // }
  45. ```
  46. # Install
  47. ```bash
  48. npm install human-signals
  49. ```
  50. This package works in Node.js >=14.18.0.
  51. This is an ES module. It must be loaded using
  52. [an `import` or `import()` statement](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c),
  53. not `require()`. If TypeScript is used, it must be configured to
  54. [output ES modules](https://www.typescriptlang.org/docs/handbook/esm-node.html),
  55. not CommonJS.
  56. # Usage
  57. ## signalsByName
  58. _Type_: `object`
  59. Object whose keys are signal [names](#name) and values are
  60. [signal objects](#signal).
  61. ## signalsByNumber
  62. _Type_: `object`
  63. Object whose keys are signal [numbers](#number) and values are
  64. [signal objects](#signal).
  65. ## signal
  66. _Type_: `object`
  67. Signal object with the following properties.
  68. ### name
  69. _Type_: `string`
  70. Standard name of the signal, for example `'SIGINT'`.
  71. ### number
  72. _Type_: `number`
  73. Code number of the signal, for example `2`. While most `number` are
  74. cross-platform, some are different between different OS.
  75. ### description
  76. _Type_: `string`
  77. Human-friendly description for the signal, for example
  78. `'User interruption with CTRL-C'`.
  79. ### supported
  80. _Type_: `boolean`
  81. Whether the current OS can handle this signal in Node.js using
  82. [`process.on(name, handler)`](https://nodejs.org/api/process.html#process_signal_events).
  83. The list of supported signals
  84. [is OS-specific](https://github.com/ehmicky/cross-platform-node-guide/blob/main/docs/6_networking_ipc/signals.md#cross-platform-signals).
  85. ### action
  86. _Type_: `string`\
  87. _Enum_: `'terminate'`, `'core'`, `'ignore'`, `'pause'`, `'unpause'`
  88. What is the default action for this signal when it is not handled.
  89. ### forced
  90. _Type_: `boolean`
  91. Whether the signal's default action cannot be prevented. This is `true` for
  92. `SIGTERM`, `SIGKILL` and `SIGSTOP`.
  93. ### standard
  94. _Type_: `string`\
  95. _Enum_: `'ansi'`, `'posix'`, `'bsd'`, `'systemv'`, `'other'`
  96. Which standard defined that signal.
  97. # Support
  98. For any question, _don't hesitate_ to [submit an issue on GitHub](../../issues).
  99. Everyone is welcome regardless of personal background. We enforce a
  100. [Code of conduct](CODE_OF_CONDUCT.md) in order to promote a positive and
  101. inclusive environment.
  102. # Contributing
  103. This project was made with ❤️. The simplest way to give back is by starring and
  104. sharing it online.
  105. If the documentation is unclear or has a typo, please click on the page's `Edit`
  106. button (pencil icon) and suggest a correction.
  107. If you would like to help us fix a bug or add a new feature, please check our
  108. [guidelines](CONTRIBUTING.md). Pull requests are welcome!
  109. Thanks go to our wonderful contributors:
  110. <!-- ALL-CONTRIBUTORS-LIST:START -->
  111. <!-- prettier-ignore-start -->
  112. <!-- markdownlint-disable -->
  113. <table>
  114. <tr>
  115. <td align="center"><a href="https://fosstodon.org/@ehmicky"><img src="https://avatars2.githubusercontent.com/u/8136211?v=4" width="100px;" alt=""/><br /><sub><b>ehmicky</b></sub></a><br /><a href="https://github.com/ehmicky/human-signals/commits?author=ehmicky" title="Code">💻</a> <a href="#design-ehmicky" title="Design">🎨</a> <a href="#ideas-ehmicky" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ehmicky/human-signals/commits?author=ehmicky" title="Documentation">📖</a></td>
  116. <td align="center"><a href="http://www.electrovir.com"><img src="https://avatars0.githubusercontent.com/u/1205860?v=4" width="100px;" alt=""/><br /><sub><b>electrovir</b></sub></a><br /><a href="https://github.com/ehmicky/human-signals/commits?author=electrovir" title="Code">💻</a></td>
  117. </tr>
  118. </table>
  119. <!-- markdownlint-enable -->
  120. <!-- prettier-ignore-end -->
  121. <!-- ALL-CONTRIBUTORS-LIST:END -->