secure-random-string
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -34,2 +34,5 @@ var crypto = require('crypto'); | ||
} | ||
if (string.length < length) { | ||
throw new Error(`Generated string is too short. Please catch this Error and try again.`); | ||
} | ||
return string.substr(0, length); | ||
@@ -36,0 +39,0 @@ } |
{ | ||
"name": "secure-random-string", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Generates a secure random string with a given length", | ||
@@ -5,0 +5,0 @@ "main": "lib/secure-random-string.js", |
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
7331
99