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

is-mergeable-object

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-mergeable-object

Check whether or not a value is an object that makes sense to iterate over

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
159K
increased by16.06%
Maintainers
1
Weekly downloads
 
Created

What is is-mergeable-object?

The is-mergeable-object npm package is a utility that helps determine if a JavaScript object is mergeable. This is particularly useful when working with deep merge operations, where you need to know if an object can be merged with another.

What are is-mergeable-object's main functionalities?

Check if an object is mergeable

This feature allows you to check if a given object is mergeable. In the code sample, `obj1` is a plain object and is mergeable, while `obj2` is an array and `obj3` is null, both of which are not mergeable.

const isMergeableObject = require('is-mergeable-object');

const obj1 = { a: 1 };
const obj2 = [1, 2, 3];
const obj3 = null;

console.log(isMergeableObject(obj1)); // true
console.log(isMergeableObject(obj2)); // false
console.log(isMergeableObject(obj3)); // false

Other packages similar to is-mergeable-object

Keywords

FAQs

Package last updated on 21 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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