UNPKG

numbers-words

Version:

numbers-words is a useful package when you are working with numbers. It can converts numbers to words, format numbers and more in the upcoming versions!

10 lines (7 loc) 225 B
function sntoNumber(sciNot) { if (typeof sciNot !== 'string' || !sciNot.includes('e')) { throw new Error("Expected a valid scientific notation string"); } return parseFloat(sciNot); } module.exports = sntoNumber;