Socket
Socket
Sign inDemoInstall

@sinclair/typebox

Package Overview
Dependencies
0
Maintainers
1
Versions
307
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.12.1 to 0.12.2

2

package.json
{
"name": "@sinclair/typebox",
"version": "0.12.1",
"version": "0.12.2",
"description": "JSONSchema Type Builder with Static Type Resolution for TypeScript",

@@ -5,0 +5,0 @@ "keywords": [

@@ -224,3 +224,3 @@ export declare const ReadonlyOptionalModifier: unique symbol;

/** Creates a `string` schema from a regular expression. */
RegEx(regex: RegExp): TString;
RegEx(regex: RegExp, options?: CustomOptions): TString;
/** Creates a `number` schema. */

@@ -227,0 +227,0 @@ Number(options?: NumberOptions): TNumber;

@@ -145,4 +145,4 @@ "use strict";

/** Creates a `string` schema from a regular expression. */
RegEx(regex) {
return this.String({ pattern: regex.source });
RegEx(regex, options = {}) {
return this.String({ ...options, pattern: regex.source });
}

@@ -149,0 +149,0 @@ /** Creates a `number` schema. */

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc