# fl-utils

> Small util functions for Frameworkstein

Latest version **0.2.0** (published 2016-07-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install fl-utils
pnpm add fl-utils
yarn add fl-utils
bun add fl-utils
```

## 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.2.0 |
| Published | 2016-07-24 |
| First published | 2016-05-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Gwilym Humphreys |
| Maintainers | founderlab |

## Links

- npm: https://www.npmjs.com/package/fl-utils
- Repository: https://github.com/founderlab/fl-server-utils
- Homepage: https://github.com/founderlab/fl-server-utils#readme
- Issues: https://github.com/founderlab/fl-server-utils/issues
- npm.io page: https://npm.io/package/fl-utils

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.0.0
- [queue-async](https://npm.io/package/queue-async.md) ^1.0.7

## Recent versions

- 0.2.0 (latest) — 2016-07-24
- 0.1.1 — 2016-05-27
- 0.1.0 — 2016-05-26

## README

# Small util functions for Frameworkstein


fetchComponentData
------------------

Call Component.fetchData on a list of React Components.

Used to tie in the data loading story for Frameworkstein.

This fetchData method of each container is called whenever it's mounted.

Used in `fl-server-utils` and `fl-react-utils`


observeStore
------------
Added observeStore, a function that will call a callback whenever a selected piece
of a redux store changes. 

Useful for e.g. adding an access token header to all requests after a user logs in:

```javascript
observeStore(store, store => store.auth.get('accessToken'), accessToken => {
  requestModifier.setHeader({authorization: `Bearer ${accessToken}`})
})

```

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