Socket
Socket
Sign inDemoInstall

merge-options

Package Overview
Dependencies
1
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 3.0.0

20

index.js
'use strict';
const isOptionObject = require('is-plain-obj');
import isOptionObject from 'is-plain-obj';
const {hasOwnProperty} = Object.prototype;
const {propertyIsEnumerable} = Object;
const defineProperty = (obj, name, value) => Object.defineProperty(obj, name, {
const defineProperty = (object, name, value) => Object.defineProperty(object, name, {
value,

@@ -14,3 +14,3 @@ writable: true,

const globalThis = this;
const defaultMergeOpts = {
const defaultMergeOptions = {
concatArrays: false,

@@ -65,7 +65,7 @@ ignoreUndefined: false

function cloneOptionObject(obj) {
const result = Object.getPrototypeOf(obj) === null ? Object.create(null) : {};
function cloneOptionObject(object) {
const result = Object.getPrototypeOf(object) === null ? Object.create(null) : {};
getEnumerableOwnPropertyKeys(obj).forEach(key => {
defineProperty(result, key, clone(obj[key]));
getEnumerableOwnPropertyKeys(object).forEach(key => {
defineProperty(result, key, clone(object[key]));
});

@@ -156,4 +156,4 @@

module.exports = function (...options) {
const config = merge(clone(defaultMergeOpts), (this !== globalThis && this) || {}, defaultMergeOpts);
export default function mergeOptions(...options) {
const config = merge(clone(defaultMergeOptions), (this !== globalThis && this) || {}, defaultMergeOptions);
let merged = {_: {}};

@@ -174,2 +174,2 @@

return merged._;
};
}
{
"name": "merge-options",
"version": "2.0.0",
"version": "3.0.0",
"type": "module",
"description": "Merge Option Objects",

@@ -12,3 +13,3 @@ "license": "MIT",

"engines": {
"node": ">=8"
"node": ">=14"
},

@@ -33,11 +34,18 @@ "scripts": {

"devDependencies": {
"ava": "^2.4.0",
"coveralls": "^3.0.3",
"nyc": "^14.1.1",
"rimraf": "^3.0.0",
"xo": "^0.25.3"
"ava": "^3.11.1",
"coveralls": "^3.1.0",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"xo": "^0.33.0"
},
"dependencies": {
"is-plain-obj": "^2.0.0"
"is-plain-obj": "^2.1.0"
},
"xo": {
"rules": {
"import/extensions": "off",
"import/no-useless-path-segments": "off",
"unicorn/import-index": "off"
}
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc