Merge branch 'main' into esm

This commit is contained in:
Sindre Sorhus 2022-06-11 17:28:27 +07:00 committed by GitHub
commit 7689d89b98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -48,7 +48,7 @@ const objectTypeNames = [
'FormData',
'URLSearchParams',
'HTMLElement',
...typedArrayTypeNames,
'NaN',
] as const;
type ObjectTypeName = typeof objectTypeNames[number];
@ -108,7 +108,7 @@ function is(value: unknown): TypeName {
case 'string':
return 'string';
case 'number':
return 'number';
return Number.isNaN(value) ? 'NaN' : 'number';
case 'boolean':
return 'boolean';
case 'function':