Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

has-properties

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-properties - npm Package Compare versions

Comparing version
1.0.0
to
1.1.0
license

Sorry, the diff of this file is not supported yet

+7
-2

@@ -9,6 +9,11 @@ 'use strict';

var isObject = function(obj) {
return (typeof obj === 'object' && !Array.isArray(obj));
};
module.exports = function(obj, keys) {
if (obj !== null && typeof obj !== 'object') {
if (obj === null || !isObject(obj)) {
throw new Error('First argument must be an object.');
}
if (!Array.isArray(keys)) {

@@ -18,2 +23,2 @@ throw new Error('Second argument must be an array.');

return diff(keys, Object.keys(obj)).length === 0;
};
};
{
"name": "has-properties",
"version": "1.0.0",
"version": "1.1.0",
"description": "Checks if the given object has the required/mandatory properties.",

@@ -5,0 +5,0 @@ "license": "MIT",