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.
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