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

mixin-deep

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mixin-deep - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

18

index.js
'use strict';
function mixinDeep(target, ...rest) {
const isObject = val => {
return typeof val === 'function' || (typeof val === 'object' && val !== null && !Array.isArray(val));
};
const isValidKey = key => {
return key !== '__proto__' && key !== 'constructor' && key !== 'prototype';
};
const mixinDeep = (target, ...rest) => {
for (let obj of rest) {
if (isObject(obj)) {
for (let key in obj) {
if (key !== '__proto__') {
if (isValidKey(key)) {
mixin(target, obj[key], key);

@@ -14,3 +22,3 @@ }

return target;
}
};

@@ -26,6 +34,2 @@ function mixin(target, val, key) {

function isObject(val) {
return typeof val === 'function' || (typeof val === 'object' && val !== null && !Array.isArray(val));
}
/**

@@ -32,0 +36,0 @@ * Expose mixinDeep

{
"name": "mixin-deep",
"description": "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. No dependencies.",
"version": "2.0.0",
"version": "2.0.1",
"homepage": "https://github.com/jonschlinkert/mixin-deep",

@@ -17,3 +17,3 @@ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",

"engines": {
"node": ">=4"
"node": ">=6"
},

@@ -24,6 +24,7 @@ "scripts": {

"devDependencies": {
"gulp-format-md": "^1.0.0",
"mocha": "^5.2.0"
"gulp-format-md": "^2.0.0",
"mocha": "^6.1.4"
},
"keywords": [
"assign",
"deep",

@@ -30,0 +31,0 @@ "extend",

@@ -1,2 +0,2 @@

# mixin-deep [![NPM version](https://img.shields.io/npm/v/mixin-deep.svg?style=flat)](https://www.npmjs.com/package/mixin-deep) [![NPM monthly downloads](https://img.shields.io/npm/dm/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![NPM total downloads](https://img.shields.io/npm/dt/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/mixin-deep.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/mixin-deep)
# mixin-deep [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8YFZ425KND68) [![NPM version](https://img.shields.io/npm/v/mixin-deep.svg?style=flat)](https://www.npmjs.com/package/mixin-deep) [![NPM monthly downloads](https://img.shields.io/npm/dm/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![NPM total downloads](https://img.shields.io/npm/dt/mixin-deep.svg?style=flat)](https://npmjs.org/package/mixin-deep) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/mixin-deep.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/mixin-deep)

@@ -15,2 +15,6 @@ > Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. No dependencies.

## Heads up!
[Please update](https://gist.github.com/jonschlinkert/9a62534c4f8bc76aee6058caa3f05fd6) to version 2.0.1 or later, a critical bug was fixed in that version.
## Usage

@@ -69,6 +73,6 @@

| **Commits** | **Contributor** |
| --- | --- |
| 26 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [doowb](https://github.com/doowb) |
| **Commits** | **Contributor** |
| --- | --- |
| 28 | [jonschlinkert](https://github.com/jonschlinkert) |
| 2 | [doowb](https://github.com/doowb) |

@@ -79,9 +83,9 @@ ### Author

* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
### License
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
Copyright © 2019, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).

@@ -91,2 +95,2 @@

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 11, 2018._
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on June 19, 2019._
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