Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

essentials

medikoo3.7mISC1.2.0

Essential initialization for every JavaScript process

initialization, process, promise, setup, unhandledrejections

readme

npm version

essentials

Essential initialization for every JavaScript process, ensures that:

Error stack traces list all stack frames

Affects all major engines, aside Firefox, in which it's not adjustable and hardcoded to 128.

Unhandled promise rejections are exposed as uncaught exceptions

Affects all V8 based engines (so Chrome and Node.js) and Microsoft Edge

In other engines it is recommended to rely on some Promise polyfill, which ensures unhandled rejections are being communicated with unhandledrejection events on global object.

Installation

npm install essentials

Usage

At top of main (entry) module simply require

require("essentials");

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.2.0 (2021-12-17)

Features

  • Prevent doubled load of the module (otherwise unhandled rejections are silent) (b8c5536)

1.1.1 (2019-11-08)

Maintanance update

1.1.0 (2019-11-08)

Features

  • Do not throw on unhandled rejection if custom handler registered (44d6301)

1.0.0 (2019-01-15)

Features

  • ensure to address browsers with process polyfill (43dbded)