Comparing version 0.3.5 to 0.3.6
@@ -31,3 +31,5 @@ // Generated by CoffeeScript 1.6.2 | ||
FnMapper.prototype.map = function(model, data) { | ||
return data = this._map.call(model, data); | ||
data = this._map.call(model, data); | ||
this._mapChildFields(model, data); | ||
return data; | ||
}; | ||
@@ -34,0 +36,0 @@ |
@@ -101,2 +101,5 @@ // Generated by CoffeeScript 1.6.2 | ||
d = {}; | ||
if (this.field.parent) { | ||
dref.set(d, this.field.path, this.field._mapper.normalize(model, model.get(this.field.path))); | ||
} | ||
for (_i = 0, _len = dataFields.length; _i < _len; _i++) { | ||
@@ -107,8 +110,8 @@ field = dataFields[_i]; | ||
} | ||
if (this.field.parent) { | ||
d = dref.get(d, this.field.path) || {}; | ||
} | ||
if (pluck) { | ||
d = model._cache.pluck(d, true); | ||
} | ||
if (d && this.field.parent) { | ||
d = dref.get(d, this.field.path) || {}; | ||
} | ||
return d != null ? d : {}; | ||
@@ -115,0 +118,0 @@ }; |
{ | ||
"name": "linen", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "Linen (line-in) maps API's to [bindable](/classdojo/bindable.js) `objects`, and `collections`. At [classdojo](http://classdojo.com), we use `linen` to abstract our API from front-end, so we don't necessarily depend on any sort of API while developing new components. This allows us to rapidly build prototypes which can be wired up later.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
99535
100
2442