serialize-html-form
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Serialize Form

Obtain a serialized object of certain form passing the id as an argument:

serializeForm('my-form');

Document body:

<form id="my-form">
  <input type="text" name="user.name" value="Antonio" />
  <input type="text" name="user.email.primary" />
  <input type="text" name="business" />
</form>

Output:

{
    user: {
      name: 'Antonio',
      email: {
        primary: ''
      }
    },
    business: ''
};

/serialize-html-form/

    Package Sidebar

    Install

    npm i serialize-html-form

    Weekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    5.97 kB

    Total Files

    12

    Last publish

    Collaborators

    • agl0809