Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

linen

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linen - npm Package Compare versions

Comparing version 0.3.32 to 0.3.33

30

lib/field/controllers/transporter/index.js

@@ -68,2 +68,5 @@ // Generated by CoffeeScript 1.6.2

};
model.loadFields = function(fields, next) {
return _this.loadFields(model, fields, next);
};
model.fetch = function(next) {

@@ -131,2 +134,14 @@ return _this.load(model, next);

Transporter.prototype.loadFields = function(model, fields, next) {
return this._request({
model: model,
method: "get",
fields: fields
}, next);
};
/*
*/
Transporter.prototype.reload = function(model, next) {

@@ -192,6 +207,19 @@ return this._request({

Transporter.prototype._request = function(options, next) {
var decor, fields,
_this = this;
if (next == null) {
next = function() {};
}
return async.forEach(this._decorators, (function(decor, next) {
if (options.fields) {
fields = options.fields.map(function(fieldName) {
return _this.rootField.getField(fieldName);
});
} else {
fields = this.rootField.allFields;
}
decor = fields.map(function(field) {
return field._transporter;
});
return async.forEach(decor, (function(decor, next) {
return decor.request(options, next);

@@ -198,0 +226,0 @@ }), next);

2

package.json
{
"name": "linen",
"version": "0.3.32",
"version": "0.3.33",
"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",

@@ -80,2 +80,11 @@ var linen = require("../.."),

it("can explicitly load fields", function(next) {
var m = s.model();
m.loadFields(["last"], function() {
expect(m.get("name")).to.be(undefined);
expect(m.get("last")).to.be("abba");
next();
})
});
describe("doesn't load when", function() {

@@ -82,0 +91,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc