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

object-diff

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-diff - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

27

index.js
'use strict';
module.exports = diff;
strict.custom = custom;
function diff(){
var length = arguments.length;
var ref = arguments[0];
module.exports = strict;
function strict(){
return diff(null, [].slice.call(arguments, 0));
}
function custom( opts ){
return diff(opts, [].slice.call(arguments, 1));
}
function diff( opts, subjects ){
var length = subjects.length;
var ref = subjects[0];
var diff = {};
var equal = opts && opts.equal || isStrictEqual;
var c;

@@ -16,3 +27,3 @@ var keys;

for (var i = 1;i < length;i++) {
c = arguments[i];
c = subjects[i];
keys = Object.keys(c);

@@ -24,3 +35,3 @@ keysLength = keys.length;

if (c[key] !== ref[key])
if (!equal(c[key], ref[key]))
diff[key] = c[key];

@@ -32,1 +43,5 @@ }

}
function isStrictEqual( a, b ){
return a === b;
}
{
"name": "object-diff",
"description": "Get the diff from objectA to objectB",
"version": "0.0.2",
"version": "0.0.3",
"main": "index.js",

@@ -17,4 +17,3 @@ "repository": {

"devDependencies": {
"tape": "^3.2.0",
"extend": "^2.0.0",
"tape": "^4.5.1",
"testling": "^1.7.1"

@@ -21,0 +20,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