UNPKG

@flex-development/pathe

Version:

Universal drop-in replacement for node:path

28 lines (27 loc) 790 B
/** * @file matchesGlob * @module pathe/lib/matchesGlob */ import micromatch from 'micromatch'; /** * Check if `input` matches `pattern`. * * @see {@linkcode micromatch.Options} * @see {@linkcode micromatch.isMatch} * * @category * core * * @this {void} * * @param {URL | string} input * The {@linkcode URL}, URL string, or path to glob-match against * @param {string | string[]} pattern * Glob patterns to use for matching * @param {micromatch.Options | null | undefined} [options] * Options for matching * @return {boolean} * `true` if `input` matches `pattern`, `false` otherwise */ declare function matchesGlob(this: void, input: URL | string, pattern: string | string[], options?: micromatch.Options | null | undefined): boolean; export default matchesGlob;