prettiest provides pretty-printing Debug
and Display
impls
for Javascript values in the wasm-bindgen crate.
Pretty
trait offers a.pretty()
method to anythingAsRef<JsValue>
.Prettified
implementsDisplay
.Prettified::skip_property
allows deleting properties that aren't useful to print, liketimeStamp
.
- Cycles in objects are broken correctly.
- Null and undefined values are handled correctly.
- Values not explicitly handled are represented by
Pretty::Unknown
. - Objects print properties from their prototype chain.
Pretty
enum renamed toPrettified
to allow trait to be namedPretty
.- Objects print non-function properties before function properties.
- Objects print their properites in prototype-order.
- HTML elements, window and document all have abbreviated output.
Initial release. Only sort of works -- not recommended for use.