New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

serialised-error

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serialised-error

Serialises error object to normal object

1.1.1
Source
npm
Version published
Weekly downloads
550K
-16.05%
Maintainers
2
Weekly downloads
 
Created
Source

Serialise Error

This module attempts to convert an error object into a regular JavaScript object. This is useful if an error object has to be stored and operated upon.

Usage

var SerialisedError = require('serialised-error');

// assuming you have an error 
var someError = new Error("This is a test error");

// convert the error to object (new operator is optional)
var serialisedError = new SerialisedError(someError);

// convert the serialised error to JSON
console.log(serialisedError.toJSON());

Installation

npm install serialised-error;

Keywords

serialise

FAQs

Package last updated on 24 Aug 2015

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