@jsvision/files / isWild
Function: isWild()
isWild(
pattern):boolean
Defined in: files/src/fs/wildcard.ts:26
Whether a pattern actually contains a wildcard (* or ?), i.e. is not a plain literal name. The file dialog uses this to decide whether a typed value re-filters the listing or names a file.
Parameters
pattern
string
The value to test.
Returns
boolean
true if it contains * or ?.
Example
ts
import { isWild } from '@jsvision/files';
isWild('*.ts'); // → true (a filter)
isWild('main.ts'); // → false (a literal filename)