(pattern, options, callback)
| 3784 | const lazyGlob = getLazy(() => require('internal/fs/glob').Glob); |
| 3785 | |
| 3786 | function glob(pattern, options, callback) { |
| 3787 | if (typeof options === 'function') { |
| 3788 | callback = options; |
| 3789 | options = undefined; |
| 3790 | } |
| 3791 | callback = makeCallback(callback); |
| 3792 | |
| 3793 | const Glob = lazyGlob(); |
| 3794 | PromisePrototypeThen( |
| 3795 | ArrayFromAsync(new Glob(pattern, options).glob()), |
| 3796 | (res) => callback(null, res), |
| 3797 | callback, |
| 3798 | ); |
| 3799 | } |
| 3800 | |
| 3801 | function globSync(pattern, options) { |
| 3802 | const Glob = lazyGlob(); |
no test coverage detected
searching dependent graphs…