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

common-errors

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-errors - npm Package Compare versions

Comparing version

to
0.4.3

@@ -40,3 +40,3 @@ var util = require('util');

var validateInput = function validateInput(str){
if(typeof str != 'string' || /^[\-\w]$/.test(str)) throw new Error("Unsafe or invalid string '" + (str || '').toString() + "' used to generate Error class.");
if(typeof str != 'string' || !/^[\-\w]+$/.test(str)) throw new Error("Unsafe or invalid string '" + (str || '').toString() + "' used to generate Error class.");
}

@@ -43,0 +43,0 @@ var validateArrayInput = function validateArrayInput(array){

@@ -5,3 +5,3 @@ {

"description": "Common error classes and utility functions",
"version": "0.4.2",
"version": "0.4.3",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",