Open victor-homyakov opened 3 years ago
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.98. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
Expected behaviour
Benchmark for
replace
should compare operations on the same stringtxt
Actual behaviour
_.replace
tries to make a replacement on non-existent stringstr
and silently fails. Therefore there is no actual comparison forreplace
.How to reproduce
node nativeVsLodash.js
Possible solution(s)
Fix the code:
Also, the RegExp in this suite is global - this may affect results.
Environment
Link or repo
https://github.com/Berkmann18/NativeVsUtils/blob/master/nativeVsLodash.js#L395-L396