@ryniaubenpm/qui-fugit-labore
v1.0.0
Published
[![github actions][actions-image]][actions-url] [![coverage][codecov-image]][codecov-url] [![dependency status][deps-svg]][deps-url] [![dev dependency status][dev-deps-svg]][dev-deps-url] [![License][license-image]][license-url] [![Downloads][downloads-im
Downloads
3
Maintainers
Keywords
Readme
@ryniaubenpm/qui-fugit-labore
An ES-spec-compliant shim/polyfill/replacement for the .cause
property on all Error types that works as far down as ES3
This package implements the es-shim API “multi” interface. It works in an ES3-supported environment and complies with the proposed spec.
Getting started
npm install --save @ryniaubenpm/qui-fugit-labore
Usage/Examples
const assert = require('assert');
require('@ryniaubenpm/qui-fugit-labore/auto');
try {
x();
} catch (e) {
const actual = new Error('a better message!', { cause: e });
assert(actual instanceof Error);
assert(actual.cause === e);
}
Tests
Clone the repo, npm install
, and run npm test