From: zurbchris Date: Wed, 18 Nov 2015 02:22:28 +0000 (-0800) Subject: updates getYoDigits to not require arguments X-Git-Tag: v6.0.0^2~24^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bfd60b54bc79888d05ea00dbac44ac14118cf57;p=thirdparty%2Ffoundation%2Ffoundation-sites.git updates getYoDigits to not require arguments --- diff --git a/js/foundation.core.js b/js/foundation.core.js index 5fe2c7831..75bf26d28 100644 --- a/js/foundation.core.js +++ b/js/foundation.core.js @@ -132,6 +132,7 @@ var Foundation = { * @returns {String} - unique id */ GetYoDigits: function(length, namespace){ + length = length || 6; return Math.round((Math.pow(36, length + 1) - Math.random() * Math.pow(36, length))).toString(36).slice(1) + (namespace ? '-' + namespace : ''); }, /**