Comments (11)
👍
from micromatch.
👍 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.
Hmm, interesting. So actually add methods to provide parity? like a "minimatch" mode or "multimatch" mode?
from micromatch.
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.
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.
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.
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.
Anyone preferring the other order does already have the option of doing mm.matcher(pattern)(path)
, which is reasonably close.
from micromatch.
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.
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.
great minds think alike! except mine thought it like 6 months later... takes me a while sometimes
from micromatch.
Related Issues (20)
- Can't match string with leading dot HOT 3
- extglob Denial of service HOT 4
- Non-filepaths matchs HOT 3
- SyntaxError: Invalid or unexpected token when running from Jest HOT 1
- 'Or' functionality broken (using |)
- Proper docs for windows option??
- Add a way to generate a glob from a file name HOT 1
- Basename breaks matching complex pattern HOT 2
- Will micromatch gradually phase out CJS support instead of abruptly (cf multimatch)? HOT 2
- Documentation incomplete for `scan`
- Alternatives in extglobs not matching correctly? HOT 5
- micromatch('.prettierrc.json', '**/*.json') => false HOT 3
- Image for sponsorships
- [BUG] Vulnerabilities Found in Micromatch and Braces HOT 2
- `micromatch.not` returns nothing if empty pattern list provided
- [BUG] Vulnerabilities Found in Micromatch and Braces HOT 38
- gitIgnore and negation patterns - not following gitIgnore specs HOT 5
- Question: Globstar and trailing slashes
- Inefficient Regular Expression Complexity vulnerability with High severity found HOT 5
- Negation style ignores dot option?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micromatch.