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.19 to 0.3.21

.browsers.js

3

lib/field/controllers/dataMapper/decor/collections/model.js

@@ -61,4 +61,3 @@ // Generated by CoffeeScript 1.6.2

}
model = this.field._refMapper.map(data, data);
model.owner = this.owner;
model = this.field._refMapper.map(this.owner, data);
model.once("save", function() {

@@ -65,0 +64,0 @@ return _this.push(model);

@@ -38,5 +38,6 @@ // Generated by CoffeeScript 1.6.2

} else {
refModel = this.field.root.service.model(this.field.options.ref, data);
refModel = this.field.root.service.model(this.field.options.ref, data, {
owner: model
});
}
refModel.owner = model;
return refModel;

@@ -43,0 +44,0 @@ };

@@ -50,6 +50,10 @@ // Generated by CoffeeScript 1.6.2

DataMapFieldController.prototype.prepareModel = function(model, data) {
DataMapFieldController.prototype.prepareModel = function(model, data, options) {
var mapper, _i, _len, _ref1, _results,
_this = this;
if (options == null) {
options = {};
}
model.owner = options.owner;
model.reset = function(data, path) {

@@ -56,0 +60,0 @@ var newData;

@@ -49,6 +49,9 @@ // Generated by CoffeeScript 1.6.2

Transporter.prototype.prepareModel = function(model, data) {
Transporter.prototype.prepareModel = function(model, data, options) {
var methodName,
_this = this;
if (options == null) {
options = {};
}
if (type(data) === "string") {

@@ -59,4 +62,4 @@ data = {

}
this._validator.prepareModel(model, data);
this._dataMapper.prepareModel(model, data);
this._validator.prepareModel(model, data, options);
this._dataMapper.prepareModel(model, data, options);
model._memos = new MemoDictionary();

@@ -63,0 +66,0 @@ model._cache = new Cache(model, data);

// Generated by CoffeeScript 1.6.2
(function() {
var EventEmitter,
var Emitter, EventEmitter,
__slice = [].slice;

@@ -8,2 +8,74 @@

Emitter = (function() {
/*
*/
function Emitter() {
this._listeners = {};
}
/*
*/
Emitter.prototype.on = function(event, callback) {
if (!this._listeners[event]) {
this._listeners[event] = [];
}
return this._listeners[event].push(callback);
};
/*
*/
Emitter.prototype.off = function(event, callback) {
var i, listeners;
if (!(listeners = this._listeners[event])) {
return;
}
i = listeners.indexOf(callback);
if (~i) {
return listeners.splice(i, 1);
}
};
/*
*/
Emitter.prototype.once = function(event, callback) {
var cb,
_this = this;
return this.on(event, cb = function() {
var args;
args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
_this.off(event, cb);
return callback.apply(null, args);
});
};
/*
*/
Emitter.prototype.emit = function(event) {
var fnArgs, listeners;
if (!(listeners = this._listeners[event])) {
return;
}
fnArgs = Array.prototype.slice.call(arguments, 1);
for(var i = listeners.length; i--;) {
listeners[i].apply(this, fnArgs);
};
return void 0;
};
return Emitter;
})();
module.exports = function(fn, ops) {

@@ -15,3 +87,3 @@ var called, em, memoizedArgs;

}
em = new EventEmitter();
em = new Emitter();
called = false;

@@ -49,3 +121,3 @@ memoizedArgs = null;

}
}), 0);
}), 1);
});

@@ -52,0 +124,0 @@ fn.apply(this, args);

{
"name": "linen",
"version": "0.3.19",
"version": "0.3.21",
"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.",

@@ -24,3 +24,14 @@ "main": "./lib/index.js",

"mocha": "~1.12.0",
"benchmark": "~1.0.0"
"benchmark": "~1.0.0",
"browserify": "~2.26.0",
"karma-script-launcher": "~0.1.0",
"karma-chrome-launcher": "~0.1.0",
"karma-firefox-launcher": "~0.1.0",
"karma-html2js-preprocessor": "~0.1.0",
"karma-jasmine": "~0.1.0",
"karma-requirejs": "~0.1.0",
"karma-coffee-preprocessor": "~0.1.0",
"karma-phantomjs-launcher": "~0.1.0",
"karma": "~0.10.0",
"karma-mocha": "~0.1.0"
},

@@ -27,0 +38,0 @@ "dependencies": {

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

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