1.0.0
Check if a glob matches a file path
Attributes
Popular
Repository
Current version released
4 years ago
Versions
glob-filter
Check if a glob matches a filepath.
Usage
import { checkFile, filterFiles } from 'https://deno.land/x/glob_filter/mod.ts'
filterFiles(['./some-file.ts', 'other-file.ts', 'file/in/dir'], { match: '**/*.ts', ignore: '**/*dir*' })
// -> ['./some-file.ts', 'other-file.ts']
checkFile({ file: './some-file.ts', glob: { match: ['**/*.test.ts', 'test/*.ts']} })
// -> false