Fglob
Bun

function

fs.promises.glob

function glob(
pattern: string | readonly string[]
): AsyncIterator<string>;
import { glob } from 'node:fs/promises';

for await (const entry of glob('*.js'))
  console.log(entry);
@returns

An AsyncIterator that yields the paths of files that match the pattern.

function glob(
pattern: string | readonly string[],
): AsyncIterator<Dirent<string>>;
import { glob } from 'node:fs/promises';

for await (const entry of glob('*.js'))
  console.log(entry);
@returns

An AsyncIterator that yields the paths of files that match the pattern.

function glob(
pattern: string | readonly string[],
): AsyncIterator<string>;
import { glob } from 'node:fs/promises';

for await (const entry of glob('*.js'))
  console.log(entry);
@returns

An AsyncIterator that yields the paths of files that match the pattern.

function glob(
pattern: string | readonly string[],
options: GlobOptions
): AsyncIterator<string | Dirent<string>>;
import { glob } from 'node:fs/promises';

for await (const entry of glob('*.js'))
  console.log(entry);
@returns

An AsyncIterator that yields the paths of files that match the pattern.