lib/libs/number.js
function random(_length) {
    
    var string_length = _length;
    if(string_length < 0)
    	string_length = 1;
    	
    var chars = "0123456789";
    
    var num = '';
    for (var i=0; i<string_length; i++) {
        var rnum = Math.floor(Math.random() * chars.length);
        num += chars.substring(rnum,rnum+1);
    }
    return num*1;
}
function random(_length) {
    
    var string_length = _length;
    if(string_length < 0)
    	string_length = 1;
    	
    var chars = "0123456789";
    
    var num = '';
    for (var i=0; i<string_length; i++) {
        var rnum = Math.floor(Math.random() * chars.length);
        num += chars.substring(rnum,rnum+1);
    }
    return num*1;
}
function random ( _length ) { var string_length = _length ; if ( string_length < 0 ) string_length = 1 ; var chars = "0123456789" ; var num = '' ; for ( var i = 0 ; i < string_length ; i ++ ) { var rnum = Math . floor ( Math . random ( ) * chars . length ) ; num += chars . substring ( rnum , rnum + 1 ) ; } return num * 1 ; }
Generates a random number of the provided length

@param {int} _length
@api public
Generates a random number of the provided length