Remove built *.js file from repo

This commit is contained in:
2012-04-16 08:40:42 +01:00
parent bc868d4160
commit 450212f4b2
3 changed files with 4 additions and 46 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
.DS_Store
node_modules
node_modules
lib/*

2
.npmignore Normal file
View File

@@ -0,0 +1,2 @@
.DS_Store
node_modules

View File

@@ -1,45 +0,0 @@
(function() {
var Base58;
Base58 = (function() {
function Base58() {
this.alphabet = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
this.base = this.alphabet.length;
}
Base58.prototype.encode = function(num) {
var mod, str;
if (typeof num !== 'number') {
throw new Error('Value passed is not a number.');
}
str = '';
while (num >= this.base) {
mod = num % this.base;
str = this.alphabet[mod] + str;
num = (num - mod) / this.base;
}
return this.alphabet[num] + str;
};
Base58.prototype.decode = function(str) {
var char, char_index, index, num, _len, _ref;
num = 0;
_ref = str.split(/(?:)/).reverse();
for (index = 0, _len = _ref.length; index < _len; index++) {
char = _ref[index];
if ((char_index = this.alphabet.indexOf(char)) === -1) {
throw new Error('Value passed not a valid Base58 string.');
}
num += char_index * Math.pow(this.base, index);
}
return num;
};
return Base58;
})();
module.exports = new Base58();
}).call(this);