Skip to content

Commit

Permalink
Use isNaN instead of Number.isNaN
Browse files Browse the repository at this point in the history
  • Loading branch information
sillvva committed Oct 17, 2023
1 parent aba4df5 commit 2867241
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion library/src/schemas/date/date.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function date(
*/
_parse(input, info) {
// Check type of input
if (!(input instanceof Date) || Number.isNaN(input.getTime())) {
if (!(input instanceof Date) || isNaN(input.getTime())) {
return getSchemaIssues(
info,
'type',
Expand Down
2 changes: 1 addition & 1 deletion library/src/schemas/date/dateAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function dateAsync(
*/
async _parse(input, info) {
// Check type of input
if (!(input instanceof Date) || Number.isNaN(input.getTime())) {
if (!(input instanceof Date) || isNaN(input.getTime())) {
return getSchemaIssues(
info,
'type',
Expand Down
2 changes: 1 addition & 1 deletion library/src/schemas/number/number.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export function number(
*/
_parse(input, info) {
// Check type of input
if (typeof input !== 'number' || Number.isNaN(input)) {
if (typeof input !== 'number' || isNaN(input)) {
return getSchemaIssues(
info,
'type',
Expand Down
2 changes: 1 addition & 1 deletion library/src/schemas/number/numberAsync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function numberAsync(
*/
async _parse(input, info) {
// Check type of input
if (typeof input !== 'number' || Number.isNaN(input)) {
if (typeof input !== 'number' || isNaN(input)) {
return getSchemaIssues(
info,
'type',
Expand Down

0 comments on commit 2867241

Please sign in to comment.