models/url_dao.js
//Function to convert base 10 integer to base58 string
Function to convert base 10 integer to base58 string
Function to convert base 10 integer to base58 string
function encode(num) {
    var encoded = '';
    while (num) {
        var remainder = num % base;
        num = Math.floor(num / base);
        encoded = alphabet[remainder].toString() + encoded;
    }
    return encoded;
}
function encode ( num ) { var encoded = '' ; while ( num ) { var remainder = num % base ; num = Math . floor ( num / base ) ; encoded = alphabet [ remainder ] . toString ( ) + encoded ; } return encoded ; }
Function to convert base 10 integer to base58 string
Function to convert base 10 integer to base58 string