# mudash

> Lodash wrapper providing Immutable.JS support

Latest version **0.10.0** (published 2017-04-19) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.10.0 |
| Published | 2017-04-19 |
| First published | 2016-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 107 |
| Author | Brian Neisler |
| Maintainers | brianneisler |
| Keywords | immutable, lodash |

## Links

- npm: https://www.npmjs.com/package/mudash
- Repository: https://github.com/brianneisler/mudash
- Homepage: https://github.com/brianneisler/mudash#readme
- Issues: https://github.com/brianneisler/mudash/issues
- npm.io page: https://npm.io/package/mudash

## Dependencies (3)

- [lodash](https://npm.io/package/lodash.md) ^4.17.4
- [immutable](https://npm.io/package/immutable.md) ^3.8.1
- [es6-symbol](https://npm.io/package/es6-symbol.md) ^3.1.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

- 0.10.0 (latest) — 2017-04-19
- 0.9.0 — 2017-04-19
- 0.8.0 — 2017-04-12
- 0.7.0 — 2017-03-20
- 0.6.0 — 2016-12-26
- 0.5.1 — 2016-12-19
- 0.5.0 — 2016-12-19
- 0.4.0 — 2016-12-13
- 0.3.2 — 2016-12-12
- 0.3.1 — 2016-12-09
- 0.3.0 — 2016-12-06
- 0.2.2 — 2016-12-02
- 0.2.1 — 2016-11-28
- 0.2.0 — 2016-11-28
- 0.1.1 — 2016-11-22
- … 12 more at https://npm.io/package/mudash/versions

## README

mudash
=============

[Lodash](https://lodash.com) wrapper providing [Immutable.JS](https://facebook.github.io/immutable-js/) support


## Benefits
- All the benefits of Lodash brought to Immutable.JS
- Supports both standard mutable values and Immutable.JS data types
- Converts types based on data hinting
- Supports mixed nested data types making it easier to process values of mixed Immutable.JS/mutable data objects
- All Lodash methods have been rewritten to be fully immutable operations (for both mutable and Immutable.JS data types)
- Supports [lodash/fp](https://github.com/lodash/lodash/wiki/FP-Guide) bringing functional programming to Immutable.JS


## Build Status

[![npm version](https://badge.fury.io/js/mudash.svg)](https://badge.fury.io/js/mudash)<br />
[![Build Status](https://travis-ci.org/brianneisler/mudash.svg)](https://travis-ci.org/brianneisler/mudash)<br />
[![NPM](https://nodei.co/npm/mudash.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/mudash/)


## Documentation

[Full API documentation](docs/API.md) - Learn about each method


## Install

```js
npm install --save mudash
```

## Usage

```js
import _ from 'mudash'
import fp from 'mudash/fp'
import Immutable from 'immutable'

// Immutable example
const map = Immutable.Map({ a:1, b:2 })
_.set(map, 'c.d', 3)    // returns Map { "a": 1, "b": 2, "c": Map { "d": 3 } }
fp.set('c.d', 3)(map)   // returns Map { "a": 1, "b": 2, "c": Map { "d": 3 } }


// Mutable example
const obj = { a:1, b:2 }
_.set(obj, 'c.d', 3)    // returns { "a": 1, "b": 2, "c": { "d": 3 } }
fp.set('c.d', 3)(obj)   // returns { "a": 1, "b": 2, "c": { "d": 3 } }
```

## Gotchas

#### Some Immutable.JS methods conflict with Lodash methods (mudash chooses Lodash)
For example, Immutable's `merge` is the equivalent of Lodash's `assign` and Lodash's `merge` is the equivalent of Immutable's `mergeDeep`. In order to reconcile this we have opted for Lodash's signature over Immutable's. Therefore, for this example, use `assign` for a shallow merge and `merge` for a deep merge.

#### Lodash has methods that mutate values (mudash does not)
In a few cases Lodash mutates values. In the case of mutable values that are passed to these methods in mudash the method will no longer mutate the value. This has resulted in a slight change to the [signature of a few methods](./docs/FAQ.md#what-functions-are-different-from-lodash).

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