common-errors
Advanced tools
Comparing version
@@ -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", |
41053
0