JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 26846207
  • Score
    100M100P100Q228045F
  • License ISC

A fast and minimal alternative to globby and fast-glob

Package Exports

  • tinyglobby

Readme

tinyglobby

npm version

A fast and minimal alternative to globby and fast-glob, meant to behave the same way.

Both globby and fast-glob present some behavior no other globbing lib has, which makes it hard to manually replace with something smaller and better.

This library uses only two subdependencies, unlike globby's 24 and fast-glob's 17.

Usage

import { glob } from 'tinyglobby';

await glob({ patterns: ['src/*.ts', '!**/*.d.ts'] });
import { globSync } from 'tinyglobby';

globSync({ patterns: ['src/*.ts', '!**/*.d.ts'] });

Options

  • patterns: An array of glob patterns to search for. If not present returns every file in the cwd.
  • ignore: An array of glob patterns to ignore.
  • cwd: The current working directory in which to search. Defaults to process.cwd().
  • absolute: Whether to return absolute paths. Defaults to false.
  • expandDirectories: Whether to expand directories. Disable to best match fast-glob. Defaults to true.