# cape-select

> A few reselect inspired helper utility/selector functions.

Latest version **3.1.2** (published 2019-07-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install cape-select
pnpm add cape-select
yarn add cape-select
bun add cape-select
```

## 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.1.2 |
| Published | 2019-07-11 |
| First published | 2016-09-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Kai Curry |
| Maintainers | kaicurry |

## Links

- npm: https://www.npmjs.com/package/cape-select
- Repository: https://github.com/cape-io/cape-select
- Homepage: https://github.com/cape-io/cape-select#readme
- Issues: https://github.com/cape-io/cape-select/issues
- npm.io page: https://npm.io/package/cape-select

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.14
- [understory](https://npm.io/package/understory.md) ^1.7.1

## Recent versions

- 3.1.2 (latest) — 2019-07-11
- 3.1.1 — 2019-07-11
- 3.1.0 — 2019-02-12
- 3.0.0 — 2019-02-12
- 2.4.0 — 2016-12-10
- 2.3.2 — 2016-12-02
- 2.3.1 — 2016-11-21
- 2.3.0 — 2016-11-12
- 2.2.1 — 2016-10-11
- 2.2.0 — 2016-10-11
- 2.1.1 — 2016-10-09
- 2.1.0 — 2016-10-09
- 2.0.0 — 2016-09-17
- 1.0.2 — 2016-09-17
- 1.0.1 — 2016-09-15
- … 1 more at https://npm.io/package/cape-select/versions

## README

# cape-select

A few `reselect` inspired helper utility/selector functions. Using functional programming as much as possible with the help of my good friend `lodash`.

Please view source for explanation and tests for usage.

- `boolSelector(selector)(state)` - Select something and turn it into boolean.
- `getProps(state, props)` - Returns the 2nd arg.
- `getProp(state, props)` - Returns property of 2nd arg.
- `getSelect(getCollection, idSelector)` - Returns the collection property at key as determined by idSelector.
- `select(selector, path, defaultValue = null)` - Send arg to selector then get property at path. Apply defaultValue.
- `simpleSelector(select1, select2, reducer)` - `createSelector()` without memoization.
- `thunkSelect(selector, props)` - Send getState() and props to selector from thunk arg signature.

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