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.3 to 0.0.4

2

index.js

@@ -19,3 +19,3 @@ 'use strict';

var diff = {};
var equal = opts && opts.equal || isStrictEqual;
var equal = opts && opts.equal || isStrictEqual;
var c;

@@ -22,0 +22,0 @@ var keys;

{
"name": "object-diff",
"description": "Get the diff from objectA to objectB",
"version": "0.0.3",
"version": "0.0.4",
"main": "index.js",

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

@@ -69,2 +69,26 @@ # object diff

*/
// using a custom equality function
var past = '2016-04-24T10:39:23.419Z';
diff.custom({
equal: dateAwareComparator,
}, {
then: new Date(past),
}, {
then: new Date(past),
});
/*
{}
*/
function dateAwareComparator( a, b ){
if (a instanceof Date && b instanceof Date)
return a.getTime() === b.getTime();
return a === b;
}
```

@@ -71,0 +95,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