@f/set-value

Set the value of an input-type DOM node

Stats

StarsIssuesVersionUpdatedCreatedSize
@f/set-value
001.0.06 years ago6 years agoMinified + gzip package size for @f/set-value in KB

Readme

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.