axtgr / wildcard-match Goto Github PK
View Code? Open in Web Editor NEWA tiny and extremely fast JavaScript library for compiling and matching basic glob patterns
License: ISC License
A tiny and extremely fast JavaScript library for compiling and matching basic glob patterns
License: ISC License
wildcardMatch('one/**/t*ee','one/two/three')
TypeScript introduced a change in 4.7 where "types"
is no longer respected in the root of package.json
and instead must be moved into "exports"
(docs).
Update the package.json exports to the recommended configuration
node_modules/wildcard-match/build/index.d.ts:9:1 - error TS2309: An export assignment cannot be used in a module with other exported elements.
"typescript": "^4.0.3"
"typescript": "^3.9.7"
No error with:
"compilerOptions": {
"skipLibCheck": true
}
Hi I'm trying to get a negative lookahead working but not sure if it's possible in this lib? I'm using it as part of
Escape-Technologies/mookme#59 (comment)
const matcher = require('wildcard-match');
const globs = [
'**/*.jsx',
'**/*.js',
'(?!dont-match/)/**/*',
];
const match = matcher(globs)
console.log(match.regexp)
// /^(?:^(?:[^/\\]*?[/\\]+?)*?[^/\\]*?\.jsx[/\\]*?$|^(?:[^/\\]*?[/\\]+?)*?[^/\\]*?\.js[/\\]*?$|^\([^/\\]!dont\-match[/\\]+?\)[/\\]+?(?:[^/\\]*?[/\\]+?)*?[^/\\]*?[/\\]*?$)$/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.