Open
Description
Since isNumber currently only checks if the value is a number or infinity.
function px (value: number | string) {
if (G.isNumber(value)) return `${value}px`
return px
}
px(1/0) // "Infinitypx"
// Proposal:
G.isFinite(1/0) // false
To be clear this does not actually add a new type guard since infinity is a number in javascript and typescript does not make the distinction.
Metadata
Metadata
Assignees
Labels
No labels