Socket
Socket
Sign inDemoInstall

ampersand-state

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-state - npm Package Compare versions

Comparing version 4.2.2 to 4.2.3

2

ampersand-state.js

@@ -409,2 +409,4 @@ var _ = require('underscore');

this.trigger('change:' + propertyName + '.' + name.split(':')[1], model, newValue);
} else if (name === 'change') {
this.trigger('change', this);
}

@@ -411,0 +413,0 @@ }, this);

2

package.json
{
"name": "ampersand-state",
"description": "An observable, extensible state object with derived watchable properties.",
"version": "4.2.2",
"version": "4.2.3",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -6,0 +6,0 @@ "bugs": {

@@ -957,2 +957,4 @@ var tape = require('tape');

t.plan(7);
//Change property

@@ -975,3 +977,3 @@ first.once('change:name', function (model, newVal) {

//Change grand child property
first.on('change:firstChild.grandChild.name', function (unsure, name) {
first.once('change:firstChild.grandChild.name', function (unsure, name) {
t.equal(name, "Phil");

@@ -982,3 +984,7 @@ });

t.end();
//Propagates change events from children too
first.once('change', function (model) {
t.equal(model, first);
});
first.firstChild.grandChild.name = 'Bob';
});

@@ -985,0 +991,0 @@

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