tinyglobby
TypeScript icon, indicating that this package has built-in type declarations

0.2.6 • Public • Published

tinyglobby

npm version monthly downloads

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 23 and fast-glob's 17.

Usage

import { glob, globSync } from 'tinyglobby';

await glob(['files/*.ts', '!**/*.d.ts'], { cwd: 'src' });
globSync(['src/**/*.ts'], { ignore: ['**/*.d.ts'] });

Options

  • patterns: An array of glob patterns to search for. Defaults to ['**/*'].
  • 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.
  • dot: Whether to allow entries starting with a dot. Defaults to false.
  • deep: Maximum depth of a directory. Defaults to Infinity.
  • caseSensitiveMatch: Whether to match in case-sensitive mode. Defaults to true.
  • expandDirectories: Whether to expand directories. Disable to best match fast-glob. Defaults to true.
  • onlyDirectories: Enable to only return directories. Disables onlyFiles if set. Defaults to false.
  • onlyFiles: Enable to only return files. Defaults to true.

Used by

tinyglobby is downloaded many times by projects all around the world. Here's a list of notable projects that use it:

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.6
    242,120
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.6
    242,120
  • 0.2.5
    235,965
  • 0.2.2
    46,173
  • 0.2.1
    3,620
  • 0.2.0
    32,823
  • 0.1.2
    4
  • 0.1.1
    4
  • 0.1.0
    4

Package Sidebar

Install

npm i tinyglobby

Weekly Downloads

560,801

Version

0.2.6

License

ISC

Unpacked Size

39.5 kB

Total Files

9

Last publish

Collaborators

  • superchupu