Socket
Socket
Sign inDemoInstall

human-signals

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.3.0 to 4.3.1

build/src/main.d.ts

152

build/src/core.js

@@ -9,4 +9,4 @@

description:"Terminal closed",
standard:"posix"},
standard:"posix"
},
{

@@ -17,4 +17,4 @@ name:"SIGINT",

description:"User interruption with CTRL-C",
standard:"ansi"},
standard:"ansi"
},
{

@@ -25,4 +25,4 @@ name:"SIGQUIT",

description:"User interruption with CTRL-\\",
standard:"posix"},
standard:"posix"
},
{

@@ -33,4 +33,4 @@ name:"SIGILL",

description:"Invalid machine instruction",
standard:"ansi"},
standard:"ansi"
},
{

@@ -41,4 +41,4 @@ name:"SIGTRAP",

description:"Debugger breakpoint",
standard:"posix"},
standard:"posix"
},
{

@@ -49,4 +49,4 @@ name:"SIGABRT",

description:"Aborted",
standard:"ansi"},
standard:"ansi"
},
{

@@ -57,4 +57,4 @@ name:"SIGIOT",

description:"Aborted",
standard:"bsd"},
standard:"bsd"
},
{

@@ -66,4 +66,4 @@ name:"SIGBUS",

"Bus error due to misaligned, non-existing address or paging error",
standard:"bsd"},
standard:"bsd"
},
{

@@ -74,4 +74,4 @@ name:"SIGEMT",

description:"Command should be emulated but is not implemented",
standard:"other"},
standard:"other"
},
{

@@ -82,4 +82,4 @@ name:"SIGFPE",

description:"Floating point arithmetic error",
standard:"ansi"},
standard:"ansi"
},
{

@@ -91,4 +91,4 @@ name:"SIGKILL",

standard:"posix",
forced:true},
forced:true
},
{

@@ -99,4 +99,4 @@ name:"SIGUSR1",

description:"Application-specific signal",
standard:"posix"},
standard:"posix"
},
{

@@ -107,4 +107,4 @@ name:"SIGSEGV",

description:"Segmentation fault",
standard:"ansi"},
standard:"ansi"
},
{

@@ -115,4 +115,4 @@ name:"SIGUSR2",

description:"Application-specific signal",
standard:"posix"},
standard:"posix"
},
{

@@ -123,4 +123,4 @@ name:"SIGPIPE",

description:"Broken pipe or socket",
standard:"posix"},
standard:"posix"
},
{

@@ -131,4 +131,4 @@ name:"SIGALRM",

description:"Timeout or timer",
standard:"posix"},
standard:"posix"
},
{

@@ -139,4 +139,4 @@ name:"SIGTERM",

description:"Termination",
standard:"ansi"},
standard:"ansi"
},
{

@@ -147,4 +147,4 @@ name:"SIGSTKFLT",

description:"Stack is empty or overflowed",
standard:"other"},
standard:"other"
},
{

@@ -155,4 +155,4 @@ name:"SIGCHLD",

description:"Child process terminated, paused or unpaused",
standard:"posix"},
standard:"posix"
},
{

@@ -163,4 +163,4 @@ name:"SIGCLD",

description:"Child process terminated, paused or unpaused",
standard:"other"},
standard:"other"
},
{

@@ -172,4 +172,4 @@ name:"SIGCONT",

standard:"posix",
forced:true},
forced:true
},
{

@@ -181,4 +181,4 @@ name:"SIGSTOP",

standard:"posix",
forced:true},
forced:true
},
{

@@ -189,4 +189,4 @@ name:"SIGTSTP",

description:"Paused using CTRL-Z or \"suspend\"",
standard:"posix"},
standard:"posix"
},
{

@@ -197,4 +197,4 @@ name:"SIGTTIN",

description:"Background process cannot read terminal input",
standard:"posix"},
standard:"posix"
},
{

@@ -205,4 +205,4 @@ name:"SIGBREAK",

description:"User interruption with CTRL-BREAK",
standard:"other"},
standard:"other"
},
{

@@ -213,4 +213,4 @@ name:"SIGTTOU",

description:"Background process cannot write to terminal output",
standard:"posix"},
standard:"posix"
},
{

@@ -221,4 +221,4 @@ name:"SIGURG",

description:"Socket received out-of-band data",
standard:"bsd"},
standard:"bsd"
},
{

@@ -229,4 +229,4 @@ name:"SIGXCPU",

description:"Process timed out",
standard:"bsd"},
standard:"bsd"
},
{

@@ -237,4 +237,4 @@ name:"SIGXFSZ",

description:"File too big",
standard:"bsd"},
standard:"bsd"
},
{

@@ -245,4 +245,4 @@ name:"SIGVTALRM",

description:"Timeout or timer",
standard:"bsd"},
standard:"bsd"
},
{

@@ -253,4 +253,4 @@ name:"SIGPROF",

description:"Timeout or timer",
standard:"bsd"},
standard:"bsd"
},
{

@@ -261,4 +261,4 @@ name:"SIGWINCH",

description:"Terminal window size changed",
standard:"bsd"},
standard:"bsd"
},
{

@@ -269,4 +269,4 @@ name:"SIGIO",

description:"I/O is available",
standard:"other"},
standard:"other"
},
{

@@ -277,4 +277,4 @@ name:"SIGPOLL",

description:"Watched event",
standard:"other"},
standard:"other"
},
{

@@ -285,4 +285,4 @@ name:"SIGINFO",

description:"Request for process information",
standard:"other"},
standard:"other"
},
{

@@ -293,4 +293,4 @@ name:"SIGPWR",

description:"Device running out of power",
standard:"systemv"},
standard:"systemv"
},
{

@@ -301,4 +301,4 @@ name:"SIGSYS",

description:"Invalid system call",
standard:"other"},
standard:"other"
},
{

@@ -309,3 +309,3 @@ name:"SIGUNUSED",

description:"Invalid system call",
standard:"other"}];
//# sourceMappingURL=core.js.map
standard:"other"
}];

@@ -8,3 +8,3 @@ import{constants}from"node:os";

const getSignalsByName=function(){
const getSignalsByName=()=>{
const signals=getSignals();

@@ -14,3 +14,3 @@ return Object.fromEntries(signals.map(getSignalByName));

const getSignalByName=function({
const getSignalByName=({
name,

@@ -22,10 +22,5 @@ number,

forced,
standard})
{
return[
name,
{name,number,description,supported,action,forced,standard}];
standard
})=>[name,{name,number,description,supported,action,forced,standard}];
};
export const signalsByName=getSignalsByName();

@@ -36,3 +31,3 @@

const getSignalsByNumber=function(){
const getSignalsByNumber=()=>{
const signals=getSignals();

@@ -46,3 +41,3 @@ const length=SIGRTMAX+1;

const getSignalByNumber=function(number,signals){
const getSignalByNumber=(number,signals)=>{
const signal=findSignalByNumber(number,signals);

@@ -63,10 +58,10 @@

forced,
standard}};
standard
}
};
};
const findSignalByNumber=function(number,signals){
const findSignalByNumber=(number,signals)=>{
const signal=signals.find(({name})=>constants.signals[name]===number);

@@ -81,3 +76,2 @@

export const signalsByNumber=getSignalsByNumber();
//# sourceMappingURL=main.js.map
export const signalsByNumber=getSignalsByNumber();
export const getRealtimeSignals=function(){
export const getRealtimeSignals=()=>{
const length=SIGRTMAX-SIGRTMIN+1;

@@ -7,4 +7,3 @@ return Array.from({length},getRealtimeSignal);

const getRealtimeSignal=function(value,index){
return{
const getRealtimeSignal=(value,index)=>({
name:`SIGRT${index+1}`,

@@ -14,8 +13,6 @@ number:SIGRTMIN+index,

description:"Application-specific signal (realtime)",
standard:"posix"};
standard:"posix"
});
};
const SIGRTMIN=34;
export const SIGRTMAX=64;
//# sourceMappingURL=realtime.js.map
export const SIGRTMAX=64;

@@ -8,3 +8,3 @@ import{constants}from"node:os";

export const getSignals=function(){
export const getSignals=()=>{
const realtimeSignals=getRealtimeSignals();

@@ -21,3 +21,3 @@ const signals=[...SIGNALS,...realtimeSignals].map(normalizeSignal);

const normalizeSignal=function({
const normalizeSignal=({
name,

@@ -28,11 +28,10 @@ number:defaultNumber,

forced=false,
standard})
{
standard
})=>{
const{
signals:{[name]:constantSignal}}=
constants;
signals:{[name]:constantSignal}
}=constants;
const supported=constantSignal!==undefined;
const number=supported?constantSignal:defaultNumber;
return{name,number,description,supported,action,forced,standard};
};
//# sourceMappingURL=signals.js.map
};
{
"name": "human-signals",
"version": "4.3.0",
"version": "4.3.1",
"type": "module",
"exports": {
"types": "./build/types/main.d.ts",
"types": "./build/src/main.d.ts",
"default": "./build/src/main.js"
},
"main": "./build/src/main.js",
"types": "./build/types/main.d.ts",
"types": "./build/src/main.d.ts",
"files": [
"build/src/**/*.{js,json}",
"build/types/**/*.d.ts"
"build/src/**/*.{js,json,d.ts}",
"!build/src/**/*.test.js",
"!build/src/{helpers,fixtures}"
],

@@ -50,9 +51,8 @@ "sideEffects": false,

"directories": {
"lib": "src",
"test": "test"
"lib": "src"
},
"devDependencies": {
"@ehmicky/dev-tasks": "^1.0.102",
"ajv": "^8.11.0",
"test-each": "^5.5.0"
"@ehmicky/dev-tasks": "^2.0.71",
"ajv": "^8.12.0",
"test-each": "^5.7.1"
},

@@ -59,0 +59,0 @@ "engines": {

[![Node](https://img.shields.io/badge/-Node.js-808080?logo=node.js&colorA=404040&logoColor=66cc33)](https://www.npmjs.com/package/human-signals)
[![TypeScript](https://img.shields.io/badge/-Typed-808080?logo=typescript&colorA=404040&logoColor=0096ff)](/types/main.d.ts)
[![TypeScript](https://img.shields.io/badge/-Typed-808080?logo=typescript&colorA=404040&logoColor=0096ff)](/src/main.d.ts)
[![Codecov](https://img.shields.io/badge/-Tested%20100%25-808080?logo=codecov&colorA=404040)](https://codecov.io/gh/ehmicky/human-signals)
[![Twitter](https://img.shields.io/badge/-Twitter-808080.svg?logo=twitter&colorA=404040)](https://twitter.com/intent/follow?screen_name=ehmicky)
[![Mastodon](https://img.shields.io/badge/-Mastodon-808080.svg?logo=mastodon&colorA=404040&logoColor=9590F9)](https://fosstodon.org/@ehmicky)
[![Medium](https://img.shields.io/badge/-Medium-808080.svg?logo=medium&colorA=404040)](https://medium.com/@ehmicky)

@@ -19,2 +19,12 @@

# Hire me
Please
[reach out](https://www.linkedin.com/feed/update/urn:li:activity:7018596298127781890/)
if you're looking for a Node.js API or CLI engineer (10 years of experience).
Most recently I have been [Netlify Build](https://github.com/netlify/build)'s
and [Netlify Plugins](https://www.netlify.com/products/build/plugins/)'
technical lead for 2.5 years. I am available for full-time remote positions in
either US or EU time zones.
# Example

@@ -54,6 +64,9 @@

This package works in Node.js >=14.18.0. It is an ES module and must be loaded
using
This package works in Node.js >=14.18.0.
This is an ES module. It must be loaded using
[an `import` or `import()` statement](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c),
not `require()`.
not `require()`. If TypeScript is used, it must be configured to
[output ES modules](https://www.typescriptlang.org/docs/handbook/esm-node.html),
not CommonJS.

@@ -159,3 +172,3 @@ # Usage

<tr>
<td align="center"><a href="https://twitter.com/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>
<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>
<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>

@@ -162,0 +175,0 @@ </tr>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc