Closed neytema closed 8 years ago
impressive! lgtm, @isaacs?
I'd like a chance to test this in the context of mini match and glob to make sure there are no surprising changes to behavior in a relevant edge case. But yes, impressive as heck!
I'll probably get a chance to review tomorrow. Holiday here in the USA :)
Sorry, I wrote code against tests and missed one case.
I thought that something smells fishy, backtracking code was to simple :)
Just tested with glob and minimatch. Seems good to me!
Definitely bump the minor version, since a new API method was added.
thank you @neytema for the implementation and @isaacs for the review, published as 0.3.0
Optimised code by using
indexOf
to find matches and array backtracking instead of recursive calls for leftover cases.Additionally search logic is separated from resulting object formation to simplify things (new API method as a side effect).
Simple benchmark shows that code runs more than 2x faster in most cases.