UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

11 lines (8 loc) 185 B
import { isSymbol } from '../predicate/isSymbol.mjs'; function toNumber(value) { if (isSymbol(value)) { return NaN; } return Number(value); } export { toNumber };