This commit is contained in:
Dom Chen 2017-05-12 01:21:59 +00:00 committed by GitHub
commit a625481ed7

View File

@ -539,7 +539,11 @@ var base54 = (function() {
var chars, frequency;
function reset() {
frequency = Object.create(null);
chars = string.split("").map(function(ch){ return ch.charCodeAt(0) });
var length = string.length;
chars = [];
for(var i=0;i<length;i++){
chars.push(string.charCodeAt(i));
}
chars.forEach(function(ch){ frequency[ch] = 0 });
}
base54.consider = function(str){