Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

errorish

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

errorish - npm Package Versions

2.0.0

Diff

rafamel
published 1.0.0 •

Changelog

Source

1.0.0 (2020-12-11)

Bug Fixes

  • deps: updates dependencies (9905c58)

Code Refactoring

  • utils: removes rejects and throws (6c9dc85)

Features

  • utils: ensure creates an Exception by default (0559541)
  • adds Exception class (e5ba311)
  • utils: adds capture (55d5e70)

improvement

  • utils: ensure doesn't capture new errors by default (9f78375)
  • utils: ensure no longer takes an EnsureCreateOptions object as a second argument (295da27)

BREAKING CHANGES

  • utils: The ensure function used to capture the stack trace of new errors created within it, even when not explicitly passed an option to. The latest implementation doesn't capture the stack trace of newly created errors by default.
  • utils: When not provided with a create function as an argument, ensure will create and return an Exception instead of a plain Error when its first argument is not an error. This Exception instance will have its data field populated with the element passed ensure as an error.
  • utils: ensure used to take an EnsureCreateOptions object as a second argument allowing to specify the input types that, when not an error, would be casted into a string for the new Error to have as message. The new implementation casts all non Error input types into a string to use as a message. Otherwise, passing an Error creating function as a second argument remains possible.
  • utils: The utility functions rejects and throws have been removed from the library as they didn't add any significant value over ensure -they acted as minimal wrappers.
  • Errorish has been replaced by the Exception class. The change is not merely of name, as the api surface has been vastly reduced. Please review the most current documentation.
rafamel
published 0.5.0 •

Changelog

Source

0.5.0 (2019-12-23)

Bug Fixes

  • Errorish: fixes static classes for inheriting classes (ae9ecf2)

chore

  • cleans up sources; begins complete rewrite (f745eb9)

Code Refactoring

  • removes I prefix from type interfaces (122d668)

Features

BREAKING CHANGES

  • Errorish has been almost entirely rewritten. Please check the updated documentation -most of its functionality has suffered changes.
  • Type interfaces are no longer prefixed by "I"
rafamel
published 0.4.0 •

Changelog

Source

0.4.0 (2019-05-13)

Bug Fixes

  • deps: updates promist to v0.6.0 (910b0c5)
  • deps: updates promist to v0.7.0 (fa8b936)

Features

  • Errorish: adds set and assign methods (844fa77)
  • Errorish: allows for message to be null (feb020d)
  • Errorish: recursively obtains root (f74fdb7)
  • Errorish: reverses source and data params order (3b17f3b)

BREAKING CHANGES

  • Errorish: While previously data was the second argument and source the third for the Errorish class constructor, now source is the second and data the third
rafamel
published 0.3.0 •

Changelog

Source

0.3.0 (2019-04-27)

Features

  • throws: takes async functions too (0e6d974)
rafamel
published 0.2.1 •

Changelog

Source

0.2.1 (2019-04-23)

Bug Fixes

  • rejects: fixes rejects typings (105a306)
rafamel
published 0.2.0 •

Changelog

Source

0.2.0 (2019-04-21)

Code Refactoring

  • types, rejects: renames IExceptionOptions to IRejectionOptions (770ccd5)

Features

  • throws: throws now takes a function instead of an error (eac3b46)

BREAKING CHANGES

  • types, rejects: IExceptionOptions is now IRejectionOptions
  • throws: throws now takes a function instead of an error; it will ensure and throw any error thrown by that function, otherwise returning its value.
rafamel
published 0.1.0 •

Changelog

Source

0.1.0 (2019-04-18)

Bug Fixes

  • ensure, normalize: prevents defaults object mutation when options are passed (3a66c02)

Features

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc