source: node_modules/es-toolkit/dist/compat/util/toNumber.js@ a762898

Last change on this file since a762898 was a762898, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Added visualizations

  • Property mode set to 100644
File size: 291 bytes
Line 
1'use strict';
2
3Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
5const isSymbol = require('../predicate/isSymbol.js');
6
7function toNumber(value) {
8 if (isSymbol.isSymbol(value)) {
9 return NaN;
10 }
11 return Number(value);
12}
13
14exports.toNumber = toNumber;
Note: See TracBrowser for help on using the repository browser.