UNPKG

scrabble-solver

Version:

Scrabble Solver 2 - Free, open-source, cross-platform, multi-language analysis tool for Scrabble, Scrabble Duel, Super Scrabble, Letter League, Crossplay, Literaki, and Kelimelik. Quickly find the top-scoring words using the given board and tiles.

12 lines (10 loc) 194 B
export const createRegExp = (input: string): RegExp => { if (input.trim().length === 0) { return /.*/; } try { return new RegExp(input, 'gi'); } catch { return /.*/; } };