Skip to content

Commit

Permalink
readme updated with default empty tag as function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Stepanek committed Jun 22, 2019
1 parent f074644 commit fa32064
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -289,7 +289,10 @@ value})``. Possible options are:
* `normalize` (default: `false`): Trim whitespaces inside text nodes.
* `explicitRoot` (default: `true`): Set this if you want to get the root
node in the resulting object.
* `emptyTag` (default: `''`): what will the value of empty nodes be.
* `emptyTag` (default: `''`): what will the value of empty nodes be. In case
you want to use an empty object as a default value, it is better to provide a factory
function `() => ({})` instead. Without this function a plain object would
become a shared reference across all occurrences with unwanted behavior.
* `explicitArray` (default: `true`): Always put child nodes in an array if
true; otherwise an array is created only if there is more than one.
* `ignoreAttrs` (default: `false`): Ignore all XML attributes and only create
Expand Down

0 comments on commit fa32064

Please sign in to comment.