🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

error-object-polyfill

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

error-object-polyfill

Replace your lame string errors with object versions.

1.2.44
latest
Source
npm
Version published
Weekly downloads
339
-16.71%
Maintainers
0
Weekly downloads
 
Created
Source

error-object-polyfill.js

Replace your lame string errors with object versions.

Usage

Use Error.create to pass objects as error messages. That's it, really simple, one line error objects, go to town!

throw Error.create({ title: 'Message', details: { data: {} } }, 'OPTIONAL_ERROR_CODE');

Keywords

nodejs

FAQs

Package last updated on 27 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts