From 1e05dd69d5354221e9201f4222a0836b836b7d32 Mon Sep 17 00:00:00 2001 From: "programmer5000.com" Date: Mon, 1 May 2017 20:00:20 -0400 Subject: [PATCH] Fix issue #9 https://github.com/aseemk/bases.js/issues/9 --- bases.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bases.js b/bases.js index fa64b17..9ca2fdf 100644 --- a/bases.js +++ b/bases.js @@ -24,6 +24,7 @@ bases.toAlphabet = function (num, alphabet) { // Returns an integer representation of the given string for the given alphabet: bases.fromAlphabet = function (str, alphabet) { + str = str.toString();//fix #9 (https://github.com/aseemk/bases.js/issues/9) var base = alphabet.length; var pos = 0; var num = 0;