New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.0.13 to 0.0.14

testing/dojo.js

50

lib/collection.js
// Generated by CoffeeScript 1.6.2
(function() {
var async, asyngleton, bindable, outcome,
var Collection, async, asyngleton, bindable, outcome,
__hasProp = {}.hasOwnProperty,

@@ -15,4 +15,4 @@ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };

module.exports = (function(_super) {
__extends(_Class, _super);
module.exports = Collection = (function(_super) {
__extends(Collection, _super);

@@ -23,7 +23,7 @@ /*

function _Class(collectionName, modelBuilder, options) {
function Collection(collectionName, modelBuilder, options) {
this.collectionName = collectionName;
this.modelBuilder = modelBuilder;
this.options = options != null ? options : {};
_Class.__super__.constructor.call(this);
Collection.__super__.constructor.call(this);
this.options.path = this.route.path || this.collectionName;

@@ -44,3 +44,3 @@ this.options.collectionName = this.collectionName;

_Class.prototype.route = function() {
Collection.prototype.route = function() {
return this.options;

@@ -53,3 +53,3 @@ };

_Class.prototype.item = function(data) {
Collection.prototype.item = function(data) {
var Item;

@@ -65,3 +65,3 @@

_Class.prototype.getModelClass = function() {
Collection.prototype.getModelClass = function() {
var self, _ref;

@@ -102,3 +102,3 @@

_Class.prototype._initCollection = function() {
Collection.prototype._initCollection = function() {
return this._initTransformations();

@@ -111,3 +111,3 @@ };

_Class.prototype._initTransformations = function() {
Collection.prototype._initTransformations = function() {
var _this = this;

@@ -125,3 +125,3 @@

_Class.prototype.reset = function(source) {
Collection.prototype.reset = function(source) {
var result;

@@ -136,3 +136,3 @@

}
result = _Class.__super__.reset.call(this, source);
result = Collection.__super__.reset.call(this, source);
this._resetting = false;

@@ -146,3 +146,3 @@ return result;

_Class.prototype.pushNoPersist = function(item) {
Collection.prototype.pushNoPersist = function(item) {
this._resetting = true;

@@ -158,9 +158,5 @@ this.push(item);

_Class.prototype.bind = function(to) {
Collection.prototype.bind = function(to) {
this.fetch();
if (!arguments.length) {
return _Class.__super__.bind.call(this);
} else {
return _Class.__super__.bind.call(this, to);
}
return Collection.__super__.bind.apply(this, arguments);
};

@@ -172,3 +168,3 @@

_Class.prototype.save = function(next) {
Collection.prototype.save = function(next) {
return async.forEach(this.source(), (function(item, next) {

@@ -183,3 +179,3 @@ return item.save(next);

_Class.prototype.fetch = asyngleton(true, function(callback) {
Collection.prototype.fetch = asyngleton(true, function(callback) {
if (this._isStatic) {

@@ -199,3 +195,3 @@ return callback();

_Class.prototype._fetchReference = function(next) {
Collection.prototype._fetchReference = function(next) {
var _this = this;

@@ -228,3 +224,3 @@

_Class.prototype._fetchVirtual = function(callback) {
Collection.prototype._fetchVirtual = function(callback) {
var request,

@@ -246,3 +242,3 @@ _this = this;

_Class.prototype._request = function(request, callback) {
Collection.prototype._request = function(request, callback) {
if (callback == null) {

@@ -259,3 +255,3 @@ callback = (function() {});

_Class.prototype._persistRemove = function(item) {
Collection.prototype._persistRemove = function(item) {
var request;

@@ -277,3 +273,3 @@

_Class.prototype._persistInsert = function(item) {
Collection.prototype._persistInsert = function(item) {
var request;

@@ -291,3 +287,3 @@

return _Class;
return Collection;

@@ -294,0 +290,0 @@ })(bindable.Collection);

@@ -18,10 +18,10 @@ // Generated by CoffeeScript 1.6.2

module.exports = function(builder, Model) {
var linen, _ref;
var LinenModel, linen, _ref;
linen = builder.linen;
return (function(_super) {
__extends(_Class, _super);
return LinenModel = (function(_super) {
__extends(LinenModel, _super);
function _Class() {
_ref = _Class.__super__.constructor.apply(this, arguments);
function LinenModel() {
_ref = LinenModel.__super__.constructor.apply(this, arguments);
return _ref;

@@ -34,3 +34,3 @@ }

_Class.prototype._initData = function(data) {
LinenModel.prototype._initData = function(data) {
this._o = outcome.e(this);

@@ -44,3 +44,3 @@ if (typeof data === "string") {

}
_Class.__super__._initData.call(this, data);
LinenModel.__super__._initData.call(this, data);
return this._setupRefs();

@@ -53,3 +53,3 @@ };

_Class.prototype.route = function(options) {
LinenModel.prototype.route = function(options) {
var _ref1;

@@ -68,4 +68,4 @@

_Class.prototype._set = function(key, value) {
_Class.__super__._set.call(this, key, value);
LinenModel.prototype._set = function(key, value) {
LinenModel.__super__._set.call(this, key, value);
if (!this._update) {

@@ -81,3 +81,3 @@ this._update = {};

_Class.prototype.hydrate = function(key, value) {
LinenModel.prototype.hydrate = function(key, value) {
this.set.apply(this, arguments);

@@ -92,3 +92,3 @@ this._update = {};

_Class.prototype.isNew = function() {
LinenModel.prototype.isNew = function() {
return !this.get("_id");

@@ -101,3 +101,12 @@ };

_Class.prototype.fetch = asyngleton(true, function(next) {
LinenModel.prototype.bind = function() {
this.fetch();
return LinenModel.__super__.bind.apply(this, arguments);
};
/*
*/
LinenModel.prototype.fetch = asyngleton(true, function(next) {
var request;

@@ -119,3 +128,3 @@

_Class.prototype._request = cstep(function(options, next) {
LinenModel.prototype._request = cstep(function(options, next) {
var _this = this;

@@ -136,3 +145,3 @@

_Class.prototype._refs = function() {
LinenModel.prototype._refs = function() {
return this.schema.refs();

@@ -145,3 +154,3 @@ };

_Class.prototype._setupRefs = function() {
LinenModel.prototype._setupRefs = function() {
var ref, _i, _len, _ref1, _results;

@@ -164,3 +173,3 @@

_Class.prototype._toObject = function(data) {
LinenModel.prototype._toObject = function(data) {
var d, key, ref, v;

@@ -185,3 +194,3 @@

_Class.prototype.save = function(next) {
LinenModel.prototype.save = function(next) {
var o,

@@ -214,3 +223,3 @@ _this = this;

_Class.prototype.remove = function(next) {
LinenModel.prototype.remove = function(next) {
if (next == null) {

@@ -229,3 +238,3 @@ next = (function() {});

return _Class;
return LinenModel;

@@ -232,0 +241,0 @@ })(Model);

{
"name": "linen",
"version": "0.0.13",
"version": "0.0.14",
"description": "```javascript",

@@ -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

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