Closed yaroslav-korotaev closed 6 years ago
Can you add a unit test?
It already here: https://github.com/davidmarkclements/quick-format/blob/4d54320969f45dd7e120cb4787615d9a030667fa/test/index.js#L47
But commented out.
Can you uncomment it then?
awesome could you please add a before/after benchmark (as in post results here)
+-20ms
before:
util*100000: 307.741ms
quickLowres*100000: 364.861ms
quick*100000: 409.436ms
utilWithTailObj*100000: 602.849ms
quickWithTailObjLowres*100000: 396.644ms
quickWithTailObj*100000: 461.702ms
util*100000: 303.272ms
quickLowres*100000: 357.494ms
quick*100000: 396.794ms
utilWithTailObj*100000: 501.232ms
quickWithTailObjLowres*100000: 373.914ms
quickWithTailObj*100000: 438.079ms
after:
util*100000: 322.366ms
quickLowres*100000: 370.941ms
quick*100000: 403.150ms
utilWithTailObj*100000: 596.590ms
quickWithTailObjLowres*100000: 393.269ms
quickWithTailObj*100000: 446.317ms
util*100000: 289.930ms
quickLowres*100000: 355.541ms
quick*100000: 396.102ms
utilWithTailObj*100000: 485.957ms
quickWithTailObjLowres*100000: 377.441ms
quickWithTailObj*100000: 428.785ms
thank you @yaroslav-korotaev !
Resolves #11
Please merge it to unescaped version too, for the pino logger