Allow hints to disable binary check
calzoneman opened this issue · 2 comments
calzoneman commented
encode
uses has-binary2
to check if the given data is binary or not:
Line 127 in f9c3549
has-binary2
has a bunch of early exits if it does find binary data, but in the case where the input is not binary, it ends up recursively walking the entire object.
It would be nice if I could pass a flag through from socket.io to say "I already know this isn't binary, so don't even bother checking" to avoid this additional expense.
darrachequesne commented
Let's do this!
darrachequesne commented