PHP 8.2.30
Preview: has-magic.js Size: 917 B
/proc/self/root/opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/node_modules/glob/dist/mjs/has-magic.js

import { Minimatch } from 'minimatch';
/**
 * Return true if the patterns provided contain any magic glob characters,
 * given the options provided.
 *
 * Brace expansion is not considered "magic" unless the `magicalBraces` option
 * is set, as brace expansion just turns one string into an array of strings.
 * So a pattern like `'x{a,b}y'` would return `false`, because `'xay'` and
 * `'xby'` both do not contain any magic glob characters, and it's treated the
 * same as if you had called it on `['xay', 'xby']`. When `magicalBraces:true`
 * 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) {
        if (new Minimatch(p, options).hasMagic())
            return true;
    }
    return false;
};
//# sourceMappingURL=has-magic.js.map

Directory Contents

Dirs: 0 × Files: 8

Name Size Perms Modified Actions
7.18 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
917 B lrw-r--r-- 2023-12-06 18:07:52
Edit Download
3.54 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
1.59 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
23 B lrw-r--r-- 2023-12-06 18:07:52
Edit Download
6.99 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
10.44 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download
10.86 KB lrw-r--r-- 2023-12-06 18:07:52
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).