{"version":3,"file":"_isFormatRegex.mjs","names":[],"sources":["../../src/internal/_isFormatRegex.ts"],"sourcesContent":["/**\n * Checks whether the runtime accepts a regular expression source without flags.\n *\n * Construction validates syntax; the resulting expression is never executed\n * against a value and is not retained.\n *\n * @evidence contracts/common.md#principled-implementation RegExp construction is the syntax authority of the runtime. Only successful construction returns true; syntax exceptions are converted to false.\n * @evidence contracts/common.md#clear-and-simple-design A single construction/exception boundary avoids maintaining a second regular expression grammar.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts Native RegExp construction is the required syntax check and is not replaced or patched. No source receives an exceptional verdict.\n * @evidence contracts/common.md#meaningful-documentation The doc states that the source is tested by construction without flags, and that the expression is neither executed against a value nor retained.\n */\nexport const _isFormatRegex = (str: string): boolean => {\n  try {\n    new RegExp(str);\n    return true;\n  } catch {\n    return false;\n  }\n};\n"],"mappings":";;;;;;;;;;;;AAWA,MAAa,kBAAkB,QAAyB;CACtD,IAAI;EACF,IAAI,OAAO,GAAG;EACd,OAAO;CACT,QAAQ;EACN,OAAO;CACT;AACF"}