mirror of
https://github.com/jimeh/node-base58.git
synced 2026-02-19 07:36:40 +00:00
Fix typo in error thrown by Base58.decode()
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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.')
|
||||||
|
|||||||
Reference in New Issue
Block a user