# immutable-object-methods

> Update normal plain javascript object, immutable style. Simlar to how immutable.js, seamless-immutable etc does it but a lot smaller and simpler.

Latest version **3.0.3** (published 2020-04-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install immutable-object-methods
pnpm add immutable-object-methods
yarn add immutable-object-methods
bun add immutable-object-methods
```

## 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 | 3.0.3 |
| Published | 2020-04-21 |
| First published | 2016-05-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 29.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | pizza-skull |
| Maintainers | ellell, iefserge, kesla |

## Links

- npm: https://www.npmjs.com/package/immutable-object-methods
- Repository: https://github.com/pizza-skull/immutable-object-methods
- Homepage: https://github.com/pizza-skull/immutable-object-methods#readme
- Issues: https://github.com/pizza-skull/immutable-object-methods/issues
- npm.io page: https://npm.io/package/immutable-object-methods

## Recent versions

- 3.0.3 (latest) — 2020-04-21
- 3.0.2 — 2020-04-20
- 3.0.1 — 2020-04-13
- 3.0.0 — 2020-04-13
- 2.0.0 — 2019-05-12
- 1.3.2 — 2018-07-18
- 1.3.1 — 2016-09-16
- 1.3.0 — 2016-08-04
- 1.2.1 — 2016-07-07
- 1.2.0 — 2016-07-07
- 1.1.2 — 2016-05-23
- 1.1.1 — 2016-05-16
- 1.1.0 — 2016-05-16
- 1.0.3 — 2016-05-13
- 1.0.2 — 2016-05-11
- … 2 more at https://npm.io/package/immutable-object-methods/versions

## README

# immutable-object-methods

Update normal plain javascript object, immutable style. Simlar to how immutable.js, seamless-immutable etc does it but a lot smaller and simpler.

## Installation

This is a [Node.js](https://nodejs.org/) module available through the 
[npm registry](https://www.npmjs.com/). It can be installed using the 
[`npm`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally)
or 
[`yarn`](https://yarnpkg.com/en/)
command line tools.

```sh
npm install immutable-object-methods --save
```

## Usage

```js
import {
  setIn,
  mergeDeep,
  assign,
  set,
  without,
} from 'immutable-object-methods';

const input = { a: { b: 'c' } };
const updated = setIn(input, ['a', 'd'], 'e');

console.log(input);
console.log(updated);

const merged = mergeDeep({ foo: 'bar' }, { beep: { boop: 4711 }, foo: 'bas' });
console.log(merged);

// immutable assign
const assigned = assign({ foo: 'bar' }, { foz: 'baz' });
console.log(assigned);

const data = set({ beep: 'boop' }, 'foo', 'bar');
console.log(data);

const beep = without({ foo: 'bar' }, 'foo');
console.log(beep);


```

## Tests

```sh
npm install
npm test
```

## Dependencies

None

## Dev Dependencies

- [ava](https://ghub.io/ava): Testing can be a drag. AVA helps you get it done.
- [package-json-to-readme](https://ghub.io/package-json-to-readme): Generate a README.md from package.json contents
- [prettier](https://ghub.io/prettier): Prettier is an opinionated code formatter
- [ts-node](https://ghub.io/ts-node): TypeScript execution environment and REPL for node.js, with source map support
- [type-fest](https://ghub.io/type-fest): A collection of essential TypeScript types
- [typescript](https://ghub.io/typescript): TypeScript is a language for application scale JavaScript development

## License

MIT

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