Skip to content

Commit

Permalink
Moved _named debugging helper to core.js
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Apr 30, 2014
1 parent 19e3e1c commit 62fe431
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dist/browser/jbinary.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/browser/jbinary.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/node/jbinary.js
Expand Up @@ -96,6 +96,9 @@
var Promise = global.Promise || require("es6-promise").Promise, _inherit = Object.create, proto = jBinary.prototype, defaultTypeSet = proto.typeSet = {};
proto.toValue = function(value) {
return toValue(this, this, value);
}, proto._named = function(func, name, offset) {
return func.displayName = name + " @ " + (void 0 !== offset ? offset : this.view.tell()),
func;
};
var defineProperty = Object.defineProperty, cacheKey = "jBinary.Cache", cacheId = 0;
proto._getCached = function(obj, valueAccessor, allowVisible) {
Expand Down Expand Up @@ -215,9 +218,6 @@
var resolvedType = this._getType(type, args);
return resolvedType && !is(type, Type) && (resolvedType.name = "object" == typeof type ? is(type, Array) ? type[0] + "(" + type.slice(1).join(", ") + ")" : "object" : String(type)),
resolvedType;
}, proto._named = function(func, name, offset) {
return func.displayName = name + " @ " + (void 0 !== offset ? offset : this.view.tell()),
func;
}, proto._action = function(type, offset, _callback) {
if (void 0 !== type) {
type = this.getType(type);
Expand Down
5 changes: 5 additions & 0 deletions src/core.js
Expand Up @@ -25,4 +25,9 @@ var defaultTypeSet = proto.typeSet = {};

proto.toValue = function (value) {
return toValue(this, this, value);
};

proto._named = function (func, name, offset) {
func.displayName = name + ' @ ' + (offset !== undefined ? offset : this.view.tell());
return func;
};
5 changes: 0 additions & 5 deletions src/proto/props.js
Expand Up @@ -40,11 +40,6 @@ proto.getType = function (type, args) {
return resolvedType;
};

proto._named = function (func, name, offset) {
func.displayName = name + ' @ ' + (offset !== undefined ? offset : this.view.tell());
return func;
};

proto._action = function (type, offset, _callback) {
if (type === undefined) {
return;
Expand Down

0 comments on commit 62fe431

Please sign in to comment.