# mutation-iterator

> Creates an object which is an async iterator which yields when any of its properties are mutated

Latest version **0.2.0** (published 2023-07-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install mutation-iterator
pnpm add mutation-iterator
yarn add mutation-iterator
bun add mutation-iterator
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2023-07-26 |
| First published | 2022-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David Beale |
| Maintainers | bealearts |

## Links

- npm: https://www.npmjs.com/package/mutation-iterator
- Repository: https://github.com/bealearts/mutation-iterator
- Homepage: https://github.com/bealearts/mutation-iterator#readme
- Issues: https://github.com/bealearts/mutation-iterator/issues
- npm.io page: https://npm.io/package/mutation-iterator

## Recent versions

- 0.2.0 (latest) — 2023-07-26
- 0.1.3 — 2022-12-01
- 0.1.2 — 2022-12-01
- 0.1.1 — 2022-11-29
- 0.1.0 — 2022-11-29

## README

# mutation-iterator

Creates an object which is an async iterator which yields when any of its properties are mutated

# Install
```shell
npm i mutation-iterator
```

# Usage

```js
import mutationIterator, { finish } from 'mutation-iterator';

const obj = mutationIterator();

obj.someProp = 'Initial...';

setTimeout(() => {
  obj.someProp = 'Hello';

  finish(obj);
}, 1000);


console.log(obj.someProp);

for await (const { someProp } of obj) {
  console.log(someProp);
}

console.log('Finished');
```

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