# extend_exclude

> Javascript object _extend()/_exclude() for deeply operate two object

Latest version **1.0.9** (published 2016-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install extend_exclude
pnpm add extend_exclude
yarn add extend_exclude
bun add extend_exclude
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.9 |
| Published | 2016-06-24 |
| First published | 2016-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | mithriljs_cn |
| Maintainers | mithriljs_cn |
| Keywords | object extend, extend, deep merge |

## Links

- npm: https://www.npmjs.com/package/extend_exclude
- Repository: https://github.com/mithriljs-cn/util_extend_exclude
- Homepage: https://github.com/mithriljs-cn/util_extend_exclude#readme
- Issues: https://github.com/mithriljs-cn/util_extend_exclude/issues
- npm.io page: https://npm.io/package/extend_exclude

## Recent versions

- 1.0.9 (latest) — 2016-06-24
- 1.0.8 — 2016-06-24
- 1.0.7 — 2016-06-24
- 1.0.6 — 2016-06-24
- 1.0.5 — 2016-06-24
- 1.0.4 — 2016-06-24

## README

# extend_exclude  [![Build Status](https://travis-ci.org/mithriljs-cn/extend_exclude.svg?branch=master)](https://travis-ci.org/mithriljs-cn/extend_exclude)

**js object _extend()/_exclude() for deeply operate two object**

### Usage:

````
var _extend = require('extend_exclude')._extend
var _exclude = require('extend_exclude')._exclude
var a = {
  x:1,
  y:{
    z:2
  }
}

var b= {
  y:{
    z:10,
    u:'name'
  }
}
_extend(a,b)
_exclude(a,b)
````

### _extend( a, b )

**Deeply merge b properties into a**

*_extend( a, b )*
````
{
  x:1,
  y:{
    z:10,
    u:'name'
  }
}
````

### _exclude( a, exclude_obj, [newValue] )

**Deeply delete exclude_obj(if key has a truthy value) from a, optionally set to newValue if present**

*_exclude( a, { y:{z:1} } )*

````
{
  x:1,
  y:{
    u:'name'
  }
}
````
*_exclude( a, { y:{z:10} } , null)*
````
{
  x:1,
  y:{
    z:null,
    u:'name'
  }
}

````

### _deepIt( a, b, callback )

**Iterate deeply with a && b simultaneously, and callback(objA, objB, key)**
````
_deepIt( a, b, function(objA,objB,key){
    objA[key] = objB[key]
} )
---> same result of _extend(a,b)
````

### Copyright @ Mithriljs_CN

---
_Source: https://npm.io/package/extend_exclude · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
