From 450212f4b2211e20e9385f34b84fbc9ea42b4746 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 16 Apr 2012 08:40:42 +0100 Subject: [PATCH] Remove built *.js file from repo --- .gitignore | 3 ++- .npmignore | 2 ++ lib/base58.js | 45 --------------------------------------------- 3 files changed, 4 insertions(+), 46 deletions(-) create mode 100644 .npmignore delete mode 100644 lib/base58.js diff --git a/.gitignore b/.gitignore index 91dfed8..77f9703 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store -node_modules \ No newline at end of file +node_modules +lib/* \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..9daa824 --- /dev/null +++ b/.npmignore @@ -0,0 +1,2 @@ +.DS_Store +node_modules diff --git a/lib/base58.js b/lib/base58.js deleted file mode 100644 index 2e57a9e..0000000 --- a/lib/base58.js +++ /dev/null @@ -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);