@sinclair/typebox 0.25.16 → 0.25.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -272,7 +272,7 @@ var TypeCompiler;
272
272
  if (IsNumber(schema.maxLength))
273
273
  yield `(${value}.length <= ${schema.maxLength})`;
274
274
  if (schema.pattern !== undefined) {
275
- const local = PushLocal(`new RegExp(/${schema.pattern}/);`);
275
+ const local = PushLocal(`${new RegExp(schema.pattern)};`);
276
276
  yield `(${local}.test(${value}))`;
277
277
  }
278
278
  if (schema.format !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinclair/typebox",
3
- "version": "0.25.16",
3
+ "version": "0.25.17",
4
4
  "description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",
5
5
  "keywords": [
6
6
  "typescript",