Socket
Socket
Sign inDemoInstall

from-exponential

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    from-exponential

Lightweight module to convert number from exponential notaton to a human readable string


Version published
Weekly downloads
21K
increased by9.57%
Maintainers
1
Install size
16.6 kB
Created
Weekly downloads
 

Changelog

Source

1.1.1 - 2021.05.28

  • #8 fix bug with negative exponents (@paulrbeg)

Readme

Source

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'

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

Keywords

FAQs

Last updated on 28 May 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc