form-input-list
Version:
Parse html and extract all the form input fields with values.
34 lines (22 loc) • 723 B
Markdown
form-input-list
===============
[](https://travis-ci.org/darkowlzz/form-input-list)
Get form input fields with values from a given html doc.
1. Install it:
```bash
$ npm i form-input-list
```
2. Require it and use:
```js
var formInput = require('form-input-list').formInput;
var html = ''; // some html text
formInput(html) // returns a promise
.then(function (list) { // promise is completed
console.log(list);
});
// [ { formIndex: 0, inputs: [ 'mail', 'username' ] },
// { formIndex: 1, inputs: [ 'msg' ] } ]
```
MIT © 2015 Sunny (darkowlzz)