# select-all-hook

> virtual-dom hook for selecting all text in an element

Latest version **1.1.0** (published 2015-11-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install select-all-hook
pnpm add select-all-hook
yarn add select-all-hook
bun add select-all-hook
```

## 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.1.0 |
| Published | 2015-11-15 |
| First published | 2015-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Ben Drucker |
| Maintainers | bendrucker |
| Keywords | select, all, hook, setSelectionRange, virtual-dom |

## Links

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

## Dependencies (1)

- [select-hook](https://npm.io/package/select-hook.md) ~1.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-11-15
- 1.0.0 — 2015-11-15

## README

# select-all-hook [![Build Status](https://travis-ci.org/bendrucker/select-all-hook.svg?branch=master)](https://travis-ci.org/bendrucker/select-all-hook)

> virtual-dom hook for selecting all text in an element


## Install

```
$ npm install --save select-all-hook
```


## Usage

```js
var h = require('virtual-dom/h')
var SelectAllHook = require('select-all-hook')

function render (state) {
  return h('input', {
    select: SelectAllHook()
  })
}
```

## API

#### `SelectAllHook([predicate])` -> `object`

Creates a virtual-dom hook that will select all text in the target element.

##### predicate

Type: `function`

An optional function predicate. If provided, the hook will only be applied when the predicate evaluates to truthy.


## License

MIT © [Ben Drucker](http://bendrucker.me)

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