ampersand-state
Advanced tools
Comparing version 4.2.2 to 4.2.3
@@ -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); |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
74082
1830