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

promised-models2

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promised-models2 - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

lib/collection.js

@@ -94,4 +94,4 @@ var Events = require('./events'),

this._cacheBranches[branch] = [].concat(this._models);
if (!changed) {
changed = true;
changed = true;
if (branch === this.DEFAULT_BRANCH) {
this.trigger('commit');

@@ -98,0 +98,0 @@ }

{
"description": "promise based, typed attributes, nested models and collections",
"name": "promised-models2",
"version": "1.1.0",
"version": "1.1.1",
"repository": "git@github.com:bem-node/promised-models.git",

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

@@ -458,4 +458,18 @@ var expect = require('chai').expect;

it('should correctly trigger commit event for added and changed models', function () {
var triggeredCount = 0,
newModel = new TestModel({a: 'a'});
collection.on('commit', function () {
triggeredCount++;
});
collection.add(newModel);
newModel.set('a', 'aa');
collection.commit();
expect(triggeredCount).to.be.equal(2);
});
});
});
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