Cars project 3 do dokończenia
This commit is contained in:
1 parent
3b96ac1be8
commit
b3be59a011
159 files changed
+9794
-3786
No files matched your search
+1
-4
@@ -11,10 +11,7 @@ import { Minimatch } from 'minimatch';
|
||||
* is in the options, brace expansion _is_ treated as a pattern having magic.
|
||||
*/
|
||||
export const hasMagic = (pattern, options = {}) => {
|
||||
if (!Array.isArray(pattern)) {
|
||||
pattern = [pattern];
|
||||
}
|
||||
for (const p of pattern) {
|
||||
for (const p of Array.isArray(pattern) ? pattern : [pattern]) {
|
||||
if (new Minimatch(p, options).hasMagic())
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user