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

@types/numeral

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/numeral

TypeScript definitions for numeral

  • 2.0.5
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @types/numeral?

@types/numeral provides TypeScript type definitions for the numeral.js library, which is used for formatting and manipulating numbers.

What are @types/numeral's main functionalities?

Number Formatting

This feature allows you to format numbers in various ways, such as adding commas as thousand separators.

const numeral = require('numeral');
const formattedNumber = numeral(1000).format('0,0');
console.log(formattedNumber); // Output: '1,000'

Currency Formatting

This feature allows you to format numbers as currency, including the appropriate currency symbol and decimal places.

const numeral = require('numeral');
const formattedCurrency = numeral(1000).format('$0,0.00');
console.log(formattedCurrency); // Output: '$1,000.00'

Percentage Formatting

This feature allows you to format numbers as percentages, including the percentage symbol and decimal places.

const numeral = require('numeral');
const formattedPercentage = numeral(0.25).format('0.00%');
console.log(formattedPercentage); // Output: '25.00%'

Unformatting

This feature allows you to convert formatted strings back into numbers.

const numeral = require('numeral');
const number = numeral().unformat('$1,000.00');
console.log(number); // Output: 1000

Other packages similar to @types/numeral

FAQs

Package last updated on 07 Nov 2023

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