]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
updates getYoDigits to not require arguments
authorzurbchris <chris@zurb.com>
Wed, 18 Nov 2015 02:22:28 +0000 (18:22 -0800)
committerzurbchris <chris@zurb.com>
Wed, 18 Nov 2015 02:22:28 +0000 (18:22 -0800)
js/foundation.core.js

index 5fe2c78316bd680db722b1bba91ca574fce796bc..75bf26d28a14e72e7bc9aa17e24183e723cd9ccb 100644 (file)
@@ -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 : '');
   },
   /**