ripple-binary-codec
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -43,4 +43,4 @@ 'use strict'; | ||
var proto = klass.prototype; | ||
function addFunc(original, wrapper) { | ||
proto[original.name] = wrapper || original; | ||
function addFunc(original, name, wrapper) { | ||
proto[name] = wrapper || original; | ||
} | ||
@@ -53,4 +53,4 @@ (definition.getters || []).forEach(function (k) { | ||
}); | ||
forEach(definition.virtuals, function (f) { | ||
addFunc(f, function () { | ||
forEach(definition.virtuals, function (f, n) { | ||
addFunc(f, n, function () { | ||
throw new Error('unimplemented'); | ||
@@ -60,5 +60,5 @@ }); | ||
forEach(definition.methods, addFunc); | ||
forEach(definition, function (f) { | ||
forEach(definition, function (f, n) { | ||
if (_.isFunction(f) && f !== klass) { | ||
addFunc(f); | ||
addFunc(f, n); | ||
} | ||
@@ -70,5 +70,5 @@ }); | ||
} | ||
forEach(definition.cached, function (f) { | ||
var key = '_' + f.name; | ||
addFunc(f, function () { | ||
forEach(definition.cached, function (f, n) { | ||
var key = '_' + n; | ||
addFunc(f, n, function () { | ||
var value = this[key]; | ||
@@ -75,0 +75,0 @@ if (value === undefined) { |
{ | ||
"name": "ripple-binary-codec", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "ripple binary codec", | ||
@@ -30,3 +30,3 @@ "files": [ | ||
"codecov.io": "^0.1.6", | ||
"eslint": "^1.2.1", | ||
"eslint": "^1.10.3", | ||
"fs-extra": "^0.24.0", | ||
@@ -33,0 +33,0 @@ "intercept-stdout": "^0.1.2", |
@@ -81,6 +81,6 @@ /* eslint-disable func-style */ | ||
function parseLedger4320278() { | ||
it(`can parse object`, (done) => { | ||
it(`can parse object`, done => { | ||
this.timeout(30e3); | ||
const json = loadFixture('as-ledger-4320278.json'); | ||
json.forEach((e) => { | ||
json.forEach(e => { | ||
assertRecycles(e.binary); | ||
@@ -87,0 +87,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
879192