unexpected
unexpected copied to clipboard
Pass custom options to inspect/diff?
Currently the only thing that can be adjusted is the depth.
I've run into some cases where it would be handy if inspect and diff accepted some options that the inspect/diff for each type could pick up on.
-
binaryArray.inspectmethod currently has an arbitrary limit of 16 bytes. Unexpected-mitm would like to set that to +Infinity in one case. -
binaryArray.diffcurrently has a somewhat arbitrarydiffLimitof 512, which it would be nice to decrease in some cases and increase in others. -
swirlwould like for unexpected-messy to use an inspection depth of Infinity for JSON/HTML/XML request/response bodies that don't have conflicts if a--verboseparameter is given.
Interestingly, the preferredWidth setting can actually be overridden per MagicPen instance, so maybe that could be a place to place such customizations?
I guess the best results would be achieved by trying to adapt the width to preferredWidth - depth * indentationWidth.