1.2.3 • Published 3 years ago

phook v1.2.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Process Hook (PHook)

This library is designed to allow developers to hook clear handlers before the process exits.

Install

Run the following command

npm install phook

APIs

phook.configure

Allow developers to modify the phook's default behaviors

phook.configure({
	// True prevents the system from showing error logs
	silent: false,

	durations: {
		// Duration before exit when system receives SIGINT
		// Set to negative value to stop quiting
		SIGINT: 100,

		// Duration before exit when receiving SIGTERM
		// Set to negative value to stop quiting
		SIGTERM: 100,

		// Duration before exit when receiving SIGQUIT
		// Set to negative value to stop quiting
		SIGQUIT: 100,

		// Duration before exit when receiving any unhandled error
		// Set to negative value to stop quiting
		UNHANDLED_ERROR: 100
	}
})
1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.0

4 years ago