From 181b61e5b65a92e423cafceb638a3b51d6ea9e99 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Tue, 29 Nov 2016 16:13:11 -0800 Subject: [PATCH] use length iso 10 --- node_modules/kaefer/lib/util.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node_modules/kaefer/lib/util.js b/node_modules/kaefer/lib/util.js index 06f781b2..772faba7 100644 --- a/node_modules/kaefer/lib/util.js +++ b/node_modules/kaefer/lib/util.js @@ -20,7 +20,7 @@ if (isNode) { exports.uid = function(length) { var values = new Uint8Array(length); window.crypto.getRandomValues(values); - return btoa(String.fromCharCode.apply(null, values)).slice(0, 10); + return btoa(String.fromCharCode.apply(null, values)).slice(0, length); }; } else { exports.uid = function(length) { @@ -28,8 +28,8 @@ if (isNode) { for (var i = 0; i < length; i++) { arr[i] = Math.floor(Math.random() * 255); } - return btoa(String.fromCharCode.apply(null, arr)).slice(0, 10); + return btoa(String.fromCharCode.apply(null, arr)).slice(0, length); }; } -}); \ No newline at end of file +});