UNPKG

tiny-readdir-glob

Version:

A simple promisified recursive readdir function, with support for globs.

16 lines (15 loc) 1.28 kB
import type { ArrayMaybe } from './types'; declare const castArray: <T>(value: T | T[]) => T[]; declare const globExplode: (glob: string) => [paths: string[], glob: string]; declare const globsExplode: (globs: string[]) => [paths: string[], globs: string[]][]; declare const globCompile: (glob: string) => ((rootPath: string, targetPath: string) => boolean); declare const globsCompile: (globs: string[]) => ((rootPath: string, targetPath: string) => boolean); declare const globsPartition: (globs: string[]) => [positives: string[], negatives: string[]]; declare const ignoreCompile: (rootPath: string, ignore?: ArrayMaybe<((targetPath: string) => boolean) | RegExp | string>) => ArrayMaybe<((targetPath: string) => boolean) | RegExp> | undefined; declare const intersection: <T>(sets: Set<T>[]) => Set<T>; declare const isPathSep: (char: string) => boolean; declare const isString: (value: unknown) => value is string; declare const uniq: <T>(values: T[]) => T[]; declare const uniqFlat: <T>(values: T[][]) => T[]; declare const uniqMergeConcat: <T>(values: Record<string, T[]>[]) => Record<string, T[]>; export { castArray, globExplode, globsExplode, globCompile, globsCompile, globsPartition, ignoreCompile, intersection, isPathSep, isString, uniq, uniqFlat, uniqMergeConcat };