New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-utl

Package Overview
Dependencies
Maintainers
1
Versions
127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-utl - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

2

package.json
{
"name": "js-utl",
"version": "2.0.0",
"version": "2.1.0",
"description": "A collection of JS utility functions to be used across several applications or libraries.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -834,2 +834,22 @@ /*

/**
* Tests if a partial object is a subset of another object.
*
* @param {Object} obj An object.
* @param {Object} partialObj A partial object which may not have all the keys of "obj"
* or may even have different keys, or keys with different values.
* @return {boolean} False if "partialObj" has a key which is not in "obj",
* or has at least one key which is also in "obj" but with a different value
* (shallow comparison), true otherwise.
*/
export function partialShallowEqual(obj, partialObj) {
return shallowEqual(
Object.keys(partialObj).reduce((carry, key) => {
carry[key] = obj[key];
return carry;
}, {}),
partialObj
);
}
/**
* Returns a shallow object diff, returning an object with two keys "objA" and "objB",

@@ -836,0 +856,0 @@ * each containing an object with all the properties of one of the two objects which are not within

@@ -73,2 +73,3 @@ /*

shallowEqual,
partialShallowEqual,
shallowObjectDiff,

@@ -75,0 +76,0 @@ nestedMapHas,

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