Convert a formData object or form DOM node to a KV object.
Generally you don't want to use this method, but attach a onchange listener
to each input element instead. Useful in certain situations tho.
var toObject = require('formdata-to-object')
var html = require('bel')
document.body.appendChild(html`
<form>
<input type="text" name="name">
<input type="password" name="password">
<input type="submit" value="Login">
</form>
`)
var form = document.querySelector('form')
var data = toObject(form)
console.log(data)
data = toObject(FormData|formElement)Convert a window.FormData object or form element to an object.