Git Product home page Git Product logo

Comments (11)

tunnckoCore avatar tunnckoCore commented on May 27, 2024

👍

from micromatch.

es128 avatar es128 commented on May 27, 2024

👍 for the primary API, but you should continue to provide methods that accomplish drop-in equivalency with matching signatures such as mm.multimatch(array, pattern) and mm.minimatch(string, glob)

from micromatch.

jonschlinkert avatar jonschlinkert commented on May 27, 2024

Hmm, interesting. So actually add methods to provide parity? like a "minimatch" mode or "multimatch" mode?

from micromatch.

es128 avatar es128 commented on May 27, 2024

Yeah, well at least just for the main functions. I think it would help people migrate, you'd just drop micromatch. in front of the existing minimatch calls.

from micromatch.

tunnckoCore avatar tunnckoCore commented on May 27, 2024

Hm yea, interesting idea, but if someone is going to add micromatch in front of minimatch/multimatch its better to replace them directly with micromatch.isMatch() or/and mm() constructor.

Jon, one idea from yesterday - micromatch.base(string/array) - for getting the base path of glob(s), like base in .expand().tokens.base. Use case - I dont want to use whole expand to only get the base and dont want to require one more dependency - glob-base. Want PR?

from micromatch.

es128 avatar es128 commented on May 27, 2024

better to replace them directly with micromatch.isMatch() or/and mm() constructor

But now if this change is implemented they'll also have to change arg order. And maybe there will be other differences in the future. The thought behind my suggestion is reducing friction for adoption of this lib as a replacement for those well-established alternatives. The further micromatch deviates from what people are used to, the more friction there will be.

from micromatch.

jonschlinkert avatar jonschlinkert commented on May 27, 2024

The further micromatch deviates from what people are used to, the more friction there will be.

Agreed, for this reason I think this is a bad idea. For my own tastes that's kind of a bummer, but it is what it is... closing

from micromatch.

es128 avatar es128 commented on May 27, 2024

Anyone preferring the other order does already have the option of doing mm.matcher(pattern)(path), which is reasonably close.

from micromatch.

jonschlinkert avatar jonschlinkert commented on May 27, 2024

true. and really, if I cared about it so much for my own projects I guess I could wrap it in a function and revers the args lol.

from micromatch.

es128 avatar es128 commented on May 27, 2024

I did pretty much the same thing here es128/progeny@9706276 when I decided I needed args reversed to improve future cases but still needed to maintain compatibility with the original consumer.

from micromatch.

jonschlinkert avatar jonschlinkert commented on May 27, 2024

great minds think alike! except mine thought it like 6 months later... takes me a while sometimes

from micromatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.