x-address-codec
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -39,3 +39,3 @@ 'use strict'; | ||
return isSet(version) ? this.encodeVersioned(bytes, version) : isSet(opts.checked) ? this.encodeChecked(bytes) : this.encodeRaw(bytes); | ||
return isSet(version) ? this.encodeVersioned(bytes, version) : opts.checked ? this.encodeChecked(bytes) : this.encodeRaw(bytes); | ||
} | ||
@@ -49,3 +49,3 @@ }, { | ||
return isSet(versions) ? this.decodeMultiVersioned(string, versions, opts.expectedLength, opts.versionTypes) : isSet(version) ? this.decodeVersioned(string, version) : isSet(opts.checked) ? this.decodeChecked(string) : this.decodeRaw(string); | ||
return isSet(versions) ? this.decodeMultiVersioned(string, versions, opts.expectedLength, opts.versionTypes) : isSet(version) ? this.decodeVersioned(string, version) : opts.checked ? this.decodeChecked(string) : this.decodeRaw(string); | ||
} | ||
@@ -122,3 +122,2 @@ }, { | ||
ret.bytes = payload; | ||
ret.versionIx = i; | ||
if (types) { | ||
@@ -147,8 +146,8 @@ ret.type = types[i]; | ||
/** | ||
* @param {Number} payloadLength - number of bytes encoded not incl checksum | ||
* @param {String} desiredPrefix - desired prefix when base58 encoded with | ||
* checksum | ||
* @param {Number} payloadLength - number of bytes encoded not incl checksum | ||
* @return {Array} version | ||
*/ | ||
value: function findPrefix(payloadLength, desiredPrefix) { | ||
value: function findPrefix(desiredPrefix, payloadLength) { | ||
if (this.base !== 58) { | ||
@@ -155,0 +154,0 @@ throw new Error('Only works for base58'); |
{ | ||
"name": "x-address-codec", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "crypto currency address codec", | ||
@@ -19,8 +19,11 @@ "files": [ | ||
"babel-core": "^5.3.2", | ||
"lodash": "^3.9.3", | ||
"babel-loader": "^5.0.0", | ||
"bn.js": "^2.0.5", | ||
"coveralls": "~2.10.0", | ||
"create-hash": "^1.1.1", | ||
"eslint": "^0.18.0", | ||
"eventemitter2": "^0.4.14", | ||
"hash.js": "^1.0.3", | ||
"istanbul": "~0.3.5", | ||
"lodash": "^3.9.3", | ||
"map-stream": "~0.1.0", | ||
@@ -30,5 +33,3 @@ "mocha": "~2.1.0", | ||
"webpack": "~1.5.3", | ||
"yargs": "~1.3.1", | ||
"hash.js": "^1.0.3", | ||
"bn.js": "^2.0.5" | ||
"yargs": "~1.3.1" | ||
}, | ||
@@ -35,0 +36,0 @@ "scripts": { |
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
14227
6
0
124
17
243