Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tinyglobby

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tinyglobby

A fast and minimal alternative to globby and fast-glob

  • 0.2.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8M
decreased by-15.23%
Maintainers
0
Weekly downloads
 
Created
Source

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 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'] });

// you can also specify patterns inside the options object (exclusive to tinyglobby)
await glob({ patterns: ['src/*.ts', '!**/*.d.ts'], dot: true });
globSync({ patterns: ['src/**/*.ts', '!**/*.d.ts'], deep: 3 });

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.
  • 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.

Keywords

FAQs

Package last updated on 24 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc