# lodash-deep

> Lodash mixins for (deep) object accessing / manipulation.

Latest version **2.0.0** (published 2016-03-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install lodash-deep
pnpm add lodash-deep
yarn add lodash-deep
bun add lodash-deep
```

## Health

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

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-03-04 |
| First published | 2014-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/lodash-deep) |
| Module format | CommonJS |
| Node | >=0.8.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 220 |
| Author | Mark Lagendijk |
| Maintainers | marklagendijk |
| Keywords | lodash, mixin, mixins, deep, object, walking |

## Links

- npm: https://www.npmjs.com/package/lodash-deep
- Repository: https://github.com/marklagendijk/lodash-deep
- Issues: https://github.com/marklagendijk/lodash-deep/issues
- npm.io page: https://npm.io/package/lodash-deep

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) >=3.7.0

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2016-03-04
- 1.6.0 — 2015-03-21
- 1.5.3 — 2015-01-02
- 1.4.2 — 2014-09-23
- 1.4.1 — 2014-09-22
- 1.4.0 — 2014-09-22
- 1.3.0 — 2014-09-18
- 1.2.1 — 2014-06-17
- 1.2.0 — 2014-06-17
- 1.1.0 — 2014-03-04

## README

# lodash-deep 
> Lodash mixins for (deep) object accessing / manipulation.

[![Bower version][bower-image]][bower-url] [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Sauce Test Status][sauce-image]][sauce-url] [![Dependency Status][depstat-image]][depstat-url]

## Version 2.x
In 2.0 most of the methods of this module where removed, because Lodash now supports their functionality natively. E.g.:

``` javascript
_.deepGet(object, 'father.name');
// ->
_.get(object, 'father.name');

_.deepPluck(array, 'father.name');
// ->
_.map(array, 'father.name');
```

## Compatibility
lodash-deep is currently compatible with:
- Node.js
- All ES5 compatible browsers (IE9+, Chrome, Firefox, Safari etc)

## Installation
### Bower
1. `bower install lodash-deep`
2. Reference `lodash-deep.min.js` after `lodash.min.js`

### Node.js
1. `npm install lodash`
2. `npm install lodash-deep`
3. 
    ``` javascript

    var _ = require("lodash");
    _.mixin(require("lodash-deep"));
    ```

## Docs
The following mixins are included in `lodash-deep`:
- [_.deepMapValues](#_deepmapvaluesobject-propertypath)

### _.deepMapValues(object, propertyPath)
Maps all values in an object tree and returns a new object with the same structure as the original.

#### object
Type: `Object`

The root object of the object tree.

#### callback
Type: `Function`

The function to be called per iteration on any non-object value in the tree.

Callback is invoked with 2 arguments: `(value, path)`.

`value` the value of the current property.

`path` the path of the current property.

#### returns
Type: `Object`

``` javascript
var object = {
    level1: {
        value: 'value 1'
        level2: {
            value: 'value 2'
            level3: {
                value: 'value 3'
            }
        }
    }
};

_.deepMapValues(object, function(value, path){
    return path + ' is ' + value)
});

/** ->
 *    {
 *        level1: {
 *            value: 'level1.value is value 1'
 *            level2: {
 *                value: 'level1.level2.value is value 2'
 *                level3: {
 *                    value: 'level1.level2.level3.value is value 3'
 *                }
 *            }
 *        }
 *    };
 */
```

## Contributing
Please use the `canary` branch when creating a pull request.

## Contributors
- [Mark Lagendijk](https://github.com/marklagendijk)
- [Andrew Luetgers](https://github.com/andrewluetgers)
- [Nelson Pecora](https://github.com/yoshokatana)
- [Mark Battersby](https://github.com/markalfred)
- [Beau Gunderson](https://github.com/beaugunderson)
- [Spencer](https://github.com/spenceralger)
- [Paul](https://github.com/paulbalomiri)
- [TheHalcyonSavant](https://github.com/TheHalcyonSavant)


[bower-url]: https://github.com/marklagendijk/lodash-deep/releases/latest
[bower-image]: https://badge.fury.io/bo/lodash-deep.svg

[npm-url]: https://www.npmjs.org/package/lodash-deep
[npm-image]: https://badge.fury.io/js/lodash-deep.svg

[travis-url]: http://travis-ci.org/marklagendijk/lodash-deep
[travis-image]: https://secure.travis-ci.org/marklagendijk/lodash-deep.svg?branch=master

[sauce-url]: https://saucelabs.com/u/marklagendijk
[sauce-image]: https://saucelabs.com/buildstatus/marklagendijk

[depstat-url]: https://david-dm.org/marklagendijk/lodash-deep
[depstat-image]: https://david-dm.org/marklagendijk/lodash-deep.svg

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