UNPKG

2.86 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.glob = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.globIterate = exports.globIterateSync = exports.globSync = exports.globStream = exports.globStreamSync = void 0;
4const minimatch_1 = require("minimatch");
5const glob_js_1 = require("./glob.js");
6const has_magic_js_1 = require("./has-magic.js");
7function globStreamSync(pattern, options = {}) {
8 return new glob_js_1.Glob(pattern, options).streamSync();
9}
10exports.globStreamSync = globStreamSync;
11function globStream(pattern, options = {}) {
12 return new glob_js_1.Glob(pattern, options).stream();
13}
14exports.globStream = globStream;
15function globSync(pattern, options = {}) {
16 return new glob_js_1.Glob(pattern, options).walkSync();
17}
18exports.globSync = globSync;
19async function glob_(pattern, options = {}) {
20 return new glob_js_1.Glob(pattern, options).walk();
21}
22function globIterateSync(pattern, options = {}) {
23 return new glob_js_1.Glob(pattern, options).iterateSync();
24}
25exports.globIterateSync = globIterateSync;
26function globIterate(pattern, options = {}) {
27 return new glob_js_1.Glob(pattern, options).iterate();
28}
29exports.globIterate = globIterate;
30// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc
31exports.streamSync = globStreamSync;
32exports.stream = Object.assign(globStream, { sync: globStreamSync });
33exports.iterateSync = globIterateSync;
34exports.iterate = Object.assign(globIterate, {
35 sync: globIterateSync,
36});
37exports.sync = Object.assign(globSync, {
38 stream: globStreamSync,
39 iterate: globIterateSync,
40});
41/* c8 ignore start */
42var minimatch_2 = require("minimatch");
43Object.defineProperty(exports, "escape", { enumerable: true, get: function () { return minimatch_2.escape; } });
44Object.defineProperty(exports, "unescape", { enumerable: true, get: function () { return minimatch_2.unescape; } });
45var glob_js_2 = require("./glob.js");
46Object.defineProperty(exports, "Glob", { enumerable: true, get: function () { return glob_js_2.Glob; } });
47var has_magic_js_2 = require("./has-magic.js");
48Object.defineProperty(exports, "hasMagic", { enumerable: true, get: function () { return has_magic_js_2.hasMagic; } });
49/* c8 ignore stop */
50exports.glob = Object.assign(glob_, {
51 glob: glob_,
52 globSync,
53 sync: exports.sync,
54 globStream,
55 stream: exports.stream,
56 globStreamSync,
57 streamSync: exports.streamSync,
58 globIterate,
59 iterate: exports.iterate,
60 globIterateSync,
61 iterateSync: exports.iterateSync,
62 Glob: glob_js_1.Glob,
63 hasMagic: has_magic_js_1.hasMagic,
64 escape: minimatch_1.escape,
65 unescape: minimatch_1.unescape,
66});
67exports.glob.glob = exports.glob;
68//# sourceMappingURL=index.js.map
\No newline at end of file