View as Markdown

API reference: @salmonui/core/data

compilePatternfunction

import { compilePattern } from '@salmonui/core/data';
function compilePattern(pattern: string, operator: 'like' | 'wildcard'): RegExp;

Compiles like (% / * = any sequence) or wildcard (* = any sequence, ? = one character) into an anchored RegExp.