Merge branch 'main' into esm
This commit is contained in:
commit
7689d89b98
2 changed files with 4 additions and 4 deletions
|
|
@ -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':
|
||||
|
|
|
|||
|
|
@ -455,8 +455,8 @@ const types = new Map<string, Test>([
|
|||
NaN, // eslint-disable-line unicorn/prefer-number-properties
|
||||
Number.NaN,
|
||||
],
|
||||
typename: 'number',
|
||||
typeDescription: AssertionTypeDescription.nan,
|
||||
typename: 'NaN',
|
||||
typeDescription: AssertionTypeDescription.nan
|
||||
}],
|
||||
['nullOrUndefined', {
|
||||
is: is.nullOrUndefined,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue