diff options
author | Jérémy Faivre <contact@jeremyfa.com> | 2018-07-17 18:05:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-17 18:05:19 +0000 |
commit | 0b53177b26dfe0c2081465e3a496c9b4cb5b1c63 (patch) | |
tree | 46d266e0f1503dfb269b6c0eea8eb0afbbb0e5c3 | |
parent | d3e1d7b11a9f9eea928fd1b9e4d605e4d69fd610 (diff) | |
parent | a9309b40ac8831aa95845b61ca5ceec6a3d806bf (diff) | |
download | yamljs-0b53177b26dfe0c2081465e3a496c9b4cb5b1c63.tar.gz |
Merge pull request #114 from trevorhreed/patch-1
Update Dumper.coffee to ignore functions, until we find a better idea.
-rw-r--r-- | src/Dumper.coffee | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Dumper.coffee b/src/Dumper.coffee index 9462966..a6cec8e 100644 --- a/src/Dumper.coffee +++ b/src/Dumper.coffee @@ -22,6 +22,10 @@ class Dumper # dump: (input, inline = 0, indent = 0, exceptionOnInvalidType = false, objectEncoder = null) -> output = '' + + if typeof(input) is 'function' + return output + prefix = (if indent then Utils.strRepeat(' ', indent) else '') if inline <= 0 or typeof(input) isnt 'object' or input instanceof Date or Utils.isEmpty(input) |