diff options
author | Trevor <trevorhreed@users.noreply.github.com> | 2018-04-07 11:30:36 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-07 11:30:36 -0600 |
commit | a9309b40ac8831aa95845b61ca5ceec6a3d806bf (patch) | |
tree | 46d266e0f1503dfb269b6c0eea8eb0afbbb0e5c3 | |
parent | d3e1d7b11a9f9eea928fd1b9e4d605e4d69fd610 (diff) | |
download | yamljs-a9309b40ac8831aa95845b61ca5ceec6a3d806bf.tar.gz |
Update Dumper.coffee
-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) |