npm.io
1.0.0 • Published 10 years ago

@f/set-value

Licence
MIT
Version
1.0.0
Deps
1
Vulns
0
Weekly
0

set-value

Build status Git tag NPM version Code style

Set the value of an input-type DOM node while preserving the user's selection.

Installation

$ npm install @f/set-value

Usage

var setValue = require('@f/set-value')

setValue(input, 'test')

API

setValue(node, value)
  • node - A DOM node that can accept a value (e.g. input, textarea)
  • value - The new value to set in the field specified by node

Returns: void

License

MIT