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

promised-models

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promised-models - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

22

lib/model.js

@@ -30,2 +30,3 @@ /**

this._eventEmitter = new EventEmitter();
this._ready = true;
this._readyPromise = fulfill();

@@ -308,3 +309,3 @@ this.storage = new Storage();

isReady: function () {
return this._readyPromise.isResolved();
return this._ready;
},

@@ -317,11 +318,3 @@

ready: function () {
var model = this;
return model._readyPromise.always(function (p) {
//promise not changed or rejected
if (model._readyPromise === p) {
return p;
} else {
return model.ready();
}
});
return this._readyPromise;
},

@@ -336,2 +329,3 @@

if (this.isReady()) {
this._ready = false;
this.trigger('calculate');

@@ -342,2 +336,5 @@ //start _calculate on next tick

});
this._readyPromise.fail(function () {
model._ready = true;
}).done();
} else {

@@ -380,2 +377,5 @@ this._requireMoreCalculations = true;

this._requireMoreCalculations = false;
this._ready = false;
if (n >= model.maxCalculations) {

@@ -406,3 +406,2 @@ return model._throwCalculationLoop();

model._setCalculatedData(calculateData);
// model.set(calculateData);
if (model._checkContinueCalculations()) {

@@ -417,2 +416,3 @@ return model._calculate(++n);

}
model._ready = true;
});

@@ -419,0 +419,0 @@ },

{
"description": "promise based, typed attributes, nested models and collections",
"name": "promised-models",
"version": "0.0.17",
"version": "0.0.18",
"repository": "git@github.com:delfrrr/promised-models.git",

@@ -6,0 +6,0 @@ "keywords": [

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