- added form-data-json.d.ts for better typescript autocompletion support (thx to @kurybr - #36)
- fixed set checkbox checked with array values on implicit names #35
- added ES6 module support with
form-data-json.es6.js
- fixed bug with option
skipEmpty
in select fields (#31)
- fixed issue with skipEmpty and nested input value #25
- fixed issue with callback is empty in case of file input
- accept a
$
instance also as html element intoJson/fromJson
, which is used by many libraries that memic jquery behaviour - previously only explicitlyjQuery
was supported
- added new toJson option
arrayify
to explicitely disable array return values when needed, default istrue
- complete refactoring - thx to https://github.com/KES777 for extensive testing
- fixed many edge case issues from v1
- removed class
FormDataJsonOptions
. Use bare{}
objects now as options - removed method
FormDataJson.flattenJsonFormValues
. UseflatList = true
option intoJson
. Note: Output still has changed significantly to v1. - changed method
FormDataJson.setInputValue
and is now considered internal only. No direct replacement. UsefromJson
if you need to set any input value - changed returned data of
formToJson/toJson
- Now some objects will be real JS arrays, if the keys are enumerated from 0 to x without a gap - removed 3rd parameter
formToJson/toJson
callback function. It is now set into optionfilesCallback
- renamed method
formToJson
totoJson
- renamed method
fillFormFromJsonValues
tofromJson
- renamed option
unsetAllInputsOnFill
toclearOthers
- renamed option
includeUncheckedAsNull
touncheckedValue
and now represent the value that unchecked inputs should have in output - added option
skipEmpty
- added option
fileReaderFunction
- added option
triggerChangeEvent
- added option
resetOthers
- added method
clear
- added method
reset
- added unminified compiled file
- optimized compiled files
- reverted option
uncheckedValue
to default toundefined
. #15
- fixed #16 in
toJson()
in combination withskipEmpty
andflatList
- fixed #13 in
toJson()
- changed option
uncheckedValue
is now false by default, instead of undefined - added option
resetOthers
forfromJson()
- changed output of option
flatList
, it now contains an array list with same values like nativeFormData()
- incorrectly compiled files
- fixed glitch in
toJson()
doesn't respect all filter options correctly
- complete refactoring
- removed class
FormDataJsonOptions
. Use bare{}
objects now as options - removed method
FormDataJson.flattenJsonFormValues
. UseflatList = true
option intoJson
. Note: Output still has changed significantly to v1. - removed method
FormDataJson.setInputValue
. No direct replacement. UsefromJson
if you need to set any input value - removed 3rd parameter
formToJson/toJson
callback function. It is now set into optionfilesCallback
- renamed method
formToJson
totoJson
- renamed method
fillFormFromJsonValues
tofromJson
- renamed option
unsetAllInputsOnFill
toclearOthers
- renamed option
includeUncheckedAsNull
touncheckedValue
and now represent the value that unchecked inputs should have in output - added option
skipEmpty
- added option
fileReaderFunction
- added option
triggerChangeEvent
- added unminified compiled file
- optimized compiled files
- fixed bug that
setInputValue
will not work forselects
when passed a non-string value
- added a new feature
inputFilter
toFormDataOptions
- Thanks to @alcalyn for the idea and initial coding in #8
- fixed node module usage #7
- fixed a bug that delete
null
values out of the result, even when they should be included
- added
FormDataJson.flattenJsonFormValues
- added
FormDataJsonOptions.defaults
- NPM version bump
- fixed setInputValue for file input fields, to not create an error
- updated src documentation
- Version bump
- Reduced NPM package included files
- Added read of file inputs
- Fixed populate of Array.isArray
- NPM and Playground added
- Initial release