Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

yields/serialize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serialize

serialize forms.

Installation

Install with component(1):

$ component install yields/serialize

Example

<input type='text' name='foo' value='baz'>
<input type='text' name='baz' value='foo'>
<select name='select'>
  <option value='1'></option>
</select>

<script>
  var el = document.forms[0];
  assert('foo=baz&baz=foo&select=1' == serialize(el));

  serialize.object(el);
  // => { foo: "baz", baz: "foo", select: "1" }
</script>

License

MIT

About

serialize a form to urlencoded string.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •