Comparing version 0.1.2 to 0.1.3
@@ -57,5 +57,11 @@ export function getCharCountsByKey(arr) { | ||
export function shuffle(arr) { | ||
if (typeof arr !== "object") | ||
if (typeof arr !== "object") { | ||
throw new Error("Please input an array as the parameter"); | ||
} | ||
if (arr.length < 2) { | ||
throw new Error("At least 2 items needed within the array"); | ||
} | ||
return arr.slice().sort(() => Math.random() - 0.5); | ||
} |
{ | ||
"name": "pedash", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "A lodash-like javascript helper -- for dummies", | ||
@@ -5,0 +5,0 @@ "main": "index.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
3016
58