1.0.3 • Published 5 years ago
zetanize v1.0.3
Zetanize
HTML form parser for humans. Javascript bindings
Zetanize is an easy, slim and pure line HTML Form parser. It is the JS implementation of python zetanize by Somdev Sangwan.
It accepts the http response (in string) and returns an array of all the forms with 3 main keys
- action
- method
- inputs
- name
- type
- value
Features
- Only one dependency (i will fix it and remove even this dependency)
- Slim line
- Clean
- Easy to use
- Formatted Output
Requirements
- NODE
- NPM
Dependencies
- jsdom
Setup and Use
Install
npm i zetanize
Import and use
const zetanize = require("zetanize")
const htmlRespone = `<!DOCTYPE html>
<html>
<head>
<title>
Dummy Page
</title>
</head>
<body>
<form>
<input>
<input type=password name=pss>
</form>
</body>
</html>`
console.log(zetanize(htmlRespone));
/* OUTPUT
[ { action: '',
method: 'GET',
input:
[ { name: '', type: 'text', value: '' },
{ name: 'pss', type: 'password', value: '' } ] } ]
*/
Contribution
Read the contributing guidelines from here
License
Zetanize is licensed under GPL-3.0