from-exponential
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

from-exponential

NPM Package Minified Size Build Status Coverage Status License: MIT

Lightweight module to convert number from exponential notation to a human readable string.

Works opposite to Number.prototype.toExponential()

Install

npm install from-exponential

Usage

import fromExponential from 'from-exponential';

fromExponential(1.123e-10); // => '0.0000000001123'
fromExponential('-12.123e-1'); // => '-1.2123'
fromExponential(Number.MAX_VALUE); // => '179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'

Related

It is complemented by the following packages:

  • pretty-num all-in-one solution for pretty numbers: format exponential, add thousands separator, reduce decimal precision
  • thousands add thousands separators

License

MIT License

Package Sidebar

Install

npm i from-exponential

Weekly Downloads

16,763

Version

1.1.1

License

MIT

Unpacked Size

16.1 kB

Total Files

11

Last publish

Collaborators

  • shrpne