Comparing version 2.1.2 to 2.1.3
@@ -11,2 +11,27 @@ 'use strict'; | ||
function _extendableBuiltin(cls) { | ||
function ExtendableBuiltin() { | ||
var instance = Reflect.construct(cls, Array.from(arguments)); | ||
Object.setPrototypeOf(instance, Object.getPrototypeOf(this)); | ||
return instance; | ||
} | ||
ExtendableBuiltin.prototype = Object.create(cls.prototype, { | ||
constructor: { | ||
value: cls, | ||
enumerable: false, | ||
writable: true, | ||
configurable: true | ||
} | ||
}); | ||
if (Object.setPrototypeOf) { | ||
Object.setPrototypeOf(ExtendableBuiltin, cls); | ||
} else { | ||
ExtendableBuiltin.__proto__ = cls; | ||
} | ||
return ExtendableBuiltin; | ||
} | ||
var os = require('os'); | ||
@@ -16,4 +41,4 @@ | ||
var YError = function (_Error) { | ||
_inherits(YError, _Error); | ||
var YError = function (_extendableBuiltin2) { | ||
_inherits(YError, _extendableBuiltin2); | ||
@@ -58,3 +83,3 @@ function YError(wrappedErrors, errorCode) { | ||
return YError; | ||
}(Error); | ||
}(_extendableBuiltin(Error)); | ||
@@ -61,0 +86,0 @@ // Wrap a classic error |
@@ -5,3 +5,3 @@ /* eslint max-nested-callbacks:[0], no-magic-numbers:[0] */ | ||
var assert = require('assert'); | ||
var YError = require('../src'); | ||
var YError = require('./index.js'); | ||
@@ -8,0 +8,0 @@ describe('YError', function () { |
{ | ||
"name": "yerror", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "It helps to know why you got an error.", | ||
"main": "dist/index.js", | ||
"main": "src/index.js", | ||
"browser": "dist/index.js", | ||
"scripts": { | ||
@@ -14,3 +15,3 @@ "build": "rm -rf dist && babel src -d dist && npm run test:build", | ||
"test": "mocha src/*.mocha.js && karma start karma.conf.js", | ||
"test:build": "mocha dist/**/*.mocha.js" | ||
"test:build": "mocha dist/*.mocha.js" | ||
}, | ||
@@ -35,5 +36,6 @@ "engines": { | ||
"devDependencies": { | ||
"browserify": "^14.4.0", | ||
"babel-cli": "^6.24.1", | ||
"babel-plugin-transform-builtin-extend": "^1.1.2", | ||
"babel-preset-es2015": "^6.24.1", | ||
"browserify": "^14.4.0", | ||
"coveralls": "~2.11.2", | ||
@@ -40,0 +42,0 @@ "eslint": "^3.4.0", |
@@ -5,3 +5,3 @@ /* eslint max-nested-callbacks:[0], no-magic-numbers:[0] */ | ||
var assert = require('assert'); | ||
var YError = require('../src'); | ||
var YError = require('./index.js'); | ||
@@ -8,0 +8,0 @@ describe('YError', () => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Possible typosquat attack
Supply chain riskThere is a package with a similar name that is downloaded much more often.
Did you mean |
---|
verror |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
256784
23
997
16
1