# observe-single-mutation

> call MutationObserver.observe() for single object (the last one), default for single attribute.

Latest version **1.0.1** (published 2022-02-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install observe-single-mutation
pnpm add observe-single-mutation
yarn add observe-single-mutation
bun add observe-single-mutation
```

## 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.1 |
| Published | 2022-02-22 |
| First published | 2022-02-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fwg |
| Maintainers | adf0001 |
| Keywords | MutationObserver.observe, single |

## Links

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

## Recent versions

- 1.0.1 (latest) — 2022-02-22
- 1.0.0 — 2022-02-22

## README

# observe-single-mutation
call MutationObserver.observe() for single object, default for single attribute.

# Install
```
npm install observe-single-mutation
```

# Usage & Api
```javascript

var observe_single_mutation = require("observe-single-mutation");

_ele('divResult3').innerHTML = "<span myattr='11'>aaa</span>";

//observe_single_mutation(target, optionOrAttribute, callback= function( mutationItem ) )
observe_single_mutation(_ele('divResult3').firstChild, "myattr",
	function (mutationItem) {
		if (_ele('divResult3').firstChild.getAttribute("myattr") == "22") { done(false); }
	}
);

setTimeout(function () { _ele('divResult3').firstChild.setAttribute("myattr", "22"); }, 500);

```

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