Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

numbro

Package Overview
Dependencies
Maintainers
2
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

numbro

Format and manipulate numbers.

  • 2.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
243K
increased by0.79%
Maintainers
2
Weekly downloads
 
Created

What is numbro?

Numbro is a JavaScript library for formatting and manipulating numbers. It provides a wide range of functionalities including number formatting, currency formatting, and parsing numbers from strings.

What are numbro's main functionalities?

Number Formatting

This feature allows you to format numbers with various options such as decimal places, thousand separators, and more.

const numbro = require('numbro');
console.log(numbro(1000.234).format('0,0.00')); // '1,000.23'

Currency Formatting

This feature allows you to format numbers as currencies, including options for thousand separators and decimal places.

const numbro = require('numbro');
console.log(numbro(1000.234).formatCurrency({ thousandSeparated: true, mantissa: 2 })); // '$1,000.23'

Parsing Numbers

This feature allows you to parse formatted number strings back into JavaScript numbers.

const numbro = require('numbro');
console.log(numbro().unformat('1,000.23')); // 1000.23

Other packages similar to numbro

Keywords

FAQs

Package last updated on 04 Apr 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc