-
-
Notifications
You must be signed in to change notification settings - Fork 28
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) // falseTo 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels