1.0.3 • Published 5 years ago

zetanize v1.0.3

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
5 years ago

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

  1. NODE
  2. NPM

Dependencies

  1. 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

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago