restructure
Advanced tools
Comparing version
{ | ||
"name": "restructure", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "Declaratively encode and decode binary data", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,3 +15,3 @@ // Generated by CoffeeScript 1.7.1 | ||
if (typeof condition === 'function') { | ||
condition = condition.call(parent); | ||
condition = condition.call(parent, parent); | ||
} | ||
@@ -27,3 +27,3 @@ if (condition) { | ||
if (typeof condition === 'function') { | ||
condition = condition.call(parent); | ||
condition = condition.call(parent, parent); | ||
} | ||
@@ -41,3 +41,3 @@ if (condition) { | ||
if (typeof condition === 'function') { | ||
condition = condition.call(parent); | ||
condition = condition.call(parent, parent); | ||
} | ||
@@ -44,0 +44,0 @@ if (condition) { |
@@ -30,3 +30,3 @@ // Generated by CoffeeScript 1.7.1 | ||
if (typeof encoding === 'function') { | ||
encoding = encoding.call(parent) || 'ascii'; | ||
encoding = encoding.call(parent, parent) || 'ascii'; | ||
} | ||
@@ -47,3 +47,3 @@ string = stream.readString(length, encoding); | ||
if (typeof encoding === 'function') { | ||
encoding = encoding.call(parent != null ? parent.val : void 0) || 'ascii'; | ||
encoding = encoding.call(parent != null ? parent.val : void 0, parent != null ? parent.val : void 0) || 'ascii'; | ||
} | ||
@@ -67,3 +67,3 @@ if (encoding === 'utf16be') { | ||
if (typeof encoding === 'function') { | ||
encoding = encoding.call(parent != null ? parent.val : void 0) || 'ascii'; | ||
encoding = encoding.call(parent != null ? parent.val : void 0, parent != null ? parent.val : void 0) || 'ascii'; | ||
} | ||
@@ -70,0 +70,0 @@ if (this.length instanceof NumberT) { |
@@ -51,3 +51,3 @@ // Generated by CoffeeScript 1.7.1 | ||
if (typeof type === 'function') { | ||
val = type.call(res); | ||
val = type.call(res, res); | ||
} else { | ||
@@ -54,0 +54,0 @@ val = type.decode(stream, res); |
@@ -12,3 +12,3 @@ // Generated by CoffeeScript 1.7.1 | ||
} else if (typeof length === 'function') { | ||
res = length.call(parent); | ||
res = length.call(parent, parent); | ||
} else if (parent && typeof length === 'string') { | ||
@@ -15,0 +15,0 @@ res = parent[length]; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
127238
0.15%