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

observ-array

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

observ-array - npm Package Compare versions

Comparing version 1.1.1 to 1.2.0

lib/set-non-enumerable.js

4

add-listener.js

@@ -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"])

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