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.32.25 to 0.32.26

4

build/require/compiler/compiler.js

@@ -180,3 +180,3 @@ "use strict";

function IsNumberLike(value) {
return !index_3.TypeSystemPolicy.AllowNaN ? `(typeof ${value} === 'number' && Number.isFinite(${value}))` : `typeof ${value} === 'number'`;
return index_3.TypeSystemPolicy.AllowNaN ? `typeof ${value} === 'number'` : `Number.isFinite(${value})`;
}

@@ -267,3 +267,3 @@ Policy.IsNumberLike = IsNumberLike;

function* FromInteger(schema, references, value) {
yield `(typeof ${value} === 'number' && Number.isInteger(${value}))`;
yield `Number.isInteger(${value})`;
if ((0, index_11.IsNumber)(schema.exclusiveMaximum))

@@ -270,0 +270,0 @@ yield `${value} < ${schema.exclusiveMaximum}`;

@@ -38,4 +38,3 @@ "use strict";

function IsNumberLike(value) {
const isNumber = (0, index_1.IsNumber)(value);
return TypeSystemPolicy.AllowNaN ? isNumber : isNumber && Number.isFinite(value);
return TypeSystemPolicy.AllowNaN ? (0, index_1.IsNumber)(value) : Number.isFinite(value);
}

@@ -42,0 +41,0 @@ TypeSystemPolicy.IsNumberLike = IsNumberLike;

@@ -159,3 +159,3 @@ "use strict";

function IsInteger(value) {
return IsNumber(value) && Number.isInteger(value);
return Number.isInteger(value);
}

@@ -162,0 +162,0 @@ exports.IsInteger = IsInteger;

{
"name": "@sinclair/typebox",
"version": "0.32.25",
"version": "0.32.26",
"description": "Json Schema Type Builder with Static Type Resolution for TypeScript",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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