Fix typo in error thrown by Base58.decode()

This commit is contained in:
2012-04-19 23:10:07 +01:00
parent 0dbaf8676d
commit 2235cafbc0
2 changed files with 2 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ class Base58Builder
num = 0 num = 0
for char, index in str.split(//).reverse() for char, index in str.split(//).reverse()
if (char_index = @alphabet.indexOf(char)) == -1 if (char_index = @alphabet.indexOf(char)) == -1
throw new Error('Value passed not a valid Base58 string.') throw new Error('Value passed is not a valid Base58 string.')
num += char_index * Math.pow(@base, index) num += char_index * Math.pow(@base, index)
num num

View File

@@ -28,4 +28,4 @@ describe 'Base58', ->
describe 'when passed a non-Base58 string', -> describe 'when passed a non-Base58 string', ->
it 'throws an error', -> it 'throws an error', ->
(-> Base58.decode('>_<')).should (-> Base58.decode('>_<')).should
.throw('Value passed not a valid Base58 string.') .throw('Value passed is not a valid Base58 string.')