observ-array
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -0,1 +1,3 @@ | ||
var setNonEnumerable = require("./lib/set-non-enumerable.js"); | ||
module.exports = addListener | ||
@@ -22,3 +24,3 @@ | ||
valueList.splice(index, 1, value) | ||
valueList._diff = [index, 1, value] | ||
setNonEnumerable(valueList, "_diff", [index, 1, value]) | ||
@@ -25,0 +27,0 @@ observArray.set(valueList) |
{ | ||
"name": "observ-array", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "An array containing observable values", | ||
@@ -20,4 +20,4 @@ "keywords": [], | ||
"dependencies": { | ||
"xtend": "~2.1.2", | ||
"observ": "~0.1.5" | ||
"xtend": "^3.0.0", | ||
"observ": "~0.2.0" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
var slice = Array.prototype.slice | ||
var addListener = require("./add-listener.js") | ||
var setNonEnumerable = require("./lib/set-non-enumerable.js"); | ||
@@ -45,3 +46,3 @@ module.exports = splice | ||
valueList._diff = valueArgs | ||
setNonEnumerable(valueList, "_diff", valueArgs) | ||
@@ -48,0 +49,0 @@ obs.set(valueList) |
@@ -52,2 +52,5 @@ var test = require("tape") | ||
assert.notEqual(changes[0], changes[1]) | ||
assert.ok(changes[0]._diff) | ||
assert.equal(Object.keys(changes[0]).indexOf("_diff"), -1) | ||
assert.deepEqual(changes[0]._diff, [0, 1, "foo2"]) | ||
assert.deepEqual(changes[0].slice(), ["foo2", "bar"]) | ||
@@ -54,0 +57,0 @@ assert.deepEqual(changes[1].slice(), ["foo2", "bar2"]) |
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
17601
12
370
+ Addedobserv@0.2.0(transitive)
+ Addedxtend@3.0.0(transitive)
- Removedobject-keys@0.4.0(transitive)
- Removedobserv@0.1.6(transitive)
- Removedxtend@2.1.2(transitive)
Updatedobserv@~0.2.0
Updatedxtend@^3.0.0