form2js
form2js copied to clipboard
feature: emptyToNull
I added this for form2js just above the skipEmpty line... basically, I want any empty value to be treated as null instead of empty string. This also works great with skipEmpty because then I don't have to send back empty values if I don't want to.
if (emptyToNull && (value === '')) { value = null; }