Skip to content

Create silent option to avoid exception for unknown types#8

Open
bertyhell wants to merge 2 commits intoamelki:masterfrom
subatomicsystems:master
Open

Create silent option to avoid exception for unknown types#8
bertyhell wants to merge 2 commits intoamelki:masterfrom
subatomicsystems:master

Conversation

@bertyhell
Copy link

@bertyhell bertyhell commented Nov 12, 2018

Functions currently throw an exception, but I use this to output a readable error object. So I don't want any exceptions from pretty print.

var json = { foo: 'test', bar: () => { const test = 'test'; } };
var html = prettyPrint.default(json, json.dimensions, {silent: true});
document.write(html);

Note: I wasn't able to get the test suite to run even before my changes. So I tested my changes it using the example page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant