# input-data-dirty

> InputDataDirty - controls [inputs, select, textarea] for having any value.

Latest version **1.0.3** (published 2017-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install input-data-dirty
pnpm add input-data-dirty
yarn add input-data-dirty
bun add input-data-dirty
```

## 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.3 |
| Published | 2017-11-05 |
| First published | 2017-11-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Max Burov |
| Maintainers | gillid |
| Keywords | input value control |

## Links

- npm: https://www.npmjs.com/package/input-data-dirty
- Repository: https://github.com/gillid/input-data-dirty
- Homepage: https://github.com/gillid/input-data-dirty#readme
- Issues: https://github.com/gillid/input-data-dirty/issues
- npm.io page: https://npm.io/package/input-data-dirty

## Dependencies (1)

- [jquery](https://npm.io/package/jquery.md) latest

## Recent versions

- 1.0.3 (latest) — 2017-11-05
- 1.0.2 — 2017-11-05
- 1.0.1 — 2017-11-05
- 1.0.0 — 2017-11-05

## README

# InputDataDirty
JavaScript tiny lib to control whether [inputs, select, textarea] has any value.  
Toggles `true / false` value on `data-dirty` attribute.  
The only dependency is `jquery`


## Install
```npm
npm install input-data-dirty
```
## Import
```javascript
import InputDataDirty from 'input-data-dirty'
```
## Usage
### Case 1 "Adding attribute"
#### Run `init()` without options
```javascript
InputDataDirty.init()
```
#### And add `data-dirty` attribute to [inputs, select, textarea] you want to control
```html
<input data-dirty>
```

### Case 2 "Control it all"
#### Run `init.()` with `controlAll` flag
```javascript
InputDataDirty.init({
    controlAll: true
})
```

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