# valoo-yarn-fix

> 🐻 valoo just the bare necessities of state management.

Latest version **2.1.1** (published 2021-08-26) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install valoo-yarn-fix
pnpm add valoo-yarn-fix
yarn add valoo-yarn-fix
bun add valoo-yarn-fix
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2021-08-26 |
| First published | 2021-08-26 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | pofider |

## Links

- npm: https://www.npmjs.com/package/valoo-yarn-fix
- npm.io page: https://npm.io/package/valoo-yarn-fix

## Recent versions

- 2.1.1 (latest) — 2021-08-26
- 2.1.0 — 2021-08-26

## README

<h1 align=center>🐻 valoo</h1>
<p align=center><em>just the bare necessities of state management.</em></p>
<p align=center><img src="https://i.imgur.com/Ke0BCSf.jpg" width="572"></p>

## Usage

Hotlink it from `https://unpkg.com/valoo`.

See [Interactive Codepen Demo](https://codepen.io/developit/pen/NzZoVp?editors=1010).

```js
import valoo from 'https://unpkg.com/valoo'

// create an observable value:
const num = valoo(42)

// subscribe to value changes:
const off = num.on( v => console.log(v) )

// unsubscribe that listener:
off()

// set the value, invoking any listeners:
num(43)

// get the current value:
num()  // 43
```

## Other Versions

- `valoo-lite.mjs`: lighter 120b version, but doesn't support unsubscribing.
- `valoo-original.mjs`: v1-compatible, with subscribe handled via overloading.

## Credit

The idea here was first implemented in [Mithril](https://mithril.js.org).
I believe the subscription mechanism is new though.

## License

Apache-2.0. Copyright 2018 Google LLC.

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