Socket
Socket
Sign inDemoInstall

es6-error

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-error - npm Package Compare versions

Comparing version 2.1.1 to 3.0.0

lib/index.js

37

package.json
{
"name": "es6-error",
"version": "2.1.1",
"version": "3.0.0",
"description": "Easily-extendable error for use with ES6 classes",
"main": "dist/index.js",
"main": "./lib/index",
"jsnext:main": "./src/index",
"scripts": {
"test": "mocha --compilers js:babel/register",
"prepublish": "npm test && make dist"
"test": "mocha --compilers js:babel-core/register --recursive",
"build": "babel ./src --out-dir ./lib",
"prepublish": "npm run build && npm run test"
},

@@ -26,7 +28,28 @@ "repository": {

"devDependencies": {
"babel": "^5.1.11",
"babel-cli": "^6.8.0",
"babel-core": "^6.8.0",
"babel-plugin-add-module-exports": "^0.1.4",
"babel-plugin-transform-builtin-extend": "^1.1.0",
"babel-preset-es2015": "^6.6.0",
"chai": "^3.2.0",
"mocha": "^2.3.2"
"mocha": "^2.4.5"
},
"dependencies": {}
"dependencies": {},
"babel": {
"presets": [
"es2015"
],
"plugins": [
"add-module-exports",
[
"babel-plugin-transform-builtin-extend",
{
"globals": [
"Error"
],
"approximate": true
}
]
]
}
}
# es6-error
![npm version](https://badge.fury.io/js/es6-error.svg)
![build status](https://travis-ci.org/bjyoungblood/es6-error.svg?branch=master)
An easily-extendable error class for use with ES6 classes (or ES5, if you so

@@ -4,0 +7,0 @@ choose).

@@ -7,2 +7,3 @@ class ExtendableError extends Error {

Object.defineProperty(this, 'message', {
configurable: true,
enumerable : false,

@@ -14,2 +15,3 @@ value : message,

Object.defineProperty(this, 'name', {
configurable: true,
enumerable : false,

@@ -26,2 +28,3 @@ value : this.constructor.name,

Object.defineProperty(this, 'stack', {
configurable: true,
enumerable : false,

@@ -28,0 +31,0 @@ value : (new Error(message)).stack,

dist/index.js
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