You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

avow

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

avow - npm Package Compare versions

Comparing version

to
3.0.2

17

index.js

@@ -9,3 +9,18 @@ 'use strict'

catch (e) {
throw e.message ? e.message : e
/**
* Node.js's assert does not allow passing of Error Objects any more
*
* See: https://git.io/vQcv7
* As of Node 8, when `assert` fails, it throws a new AssertionError.
* Thus, if you pass an Error object to a call to `assert` it will ignore
* it.
*
* In order to throw custom errors, we refer to the original
* arguments passed into avow.
*
* This will also work for Node 7 and under.
*/
const lastArg = args[args.length - 1]
if (lastArg instanceof Error) throw lastArg
throw e
}

@@ -12,0 +27,0 @@ }

2

package.json
{
"name": "avow",
"version": "3.0.1",
"version": "3.0.2",
"description": "Proxy for assert that accepts custom Errors",

@@ -5,0 +5,0 @@ "engines": {