typia
Version:
Superfast runtime validators with only one line
1 lines • 382 B
Source Map (JSON)
{"version":3,"file":"_isFormatRegex.mjs","names":[],"sources":["../../src/internal/_isFormatRegex.ts"],"sourcesContent":["export const _isFormatRegex = (str: string): boolean => {\n try {\n new RegExp(str);\n return true;\n } catch {\n return false;\n }\n};\n"],"mappings":";AAAA,MAAa,kBAAkB,QAAyB;CACtD,IAAI;EACF,IAAI,OAAO,GAAG;EACd,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF"}