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

currency-in-words

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

currency-in-words

convert currency or any numbers to corresponding words, eg: 1 -> "one", 10 -> "ten", 101 -> "one hundred and one" etc...

  • 1.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-93.42%
Maintainers
1
Weekly downloads
 
Created
Source

currency-in-words

Convert currency or any number formats to respective words


Note


| 1. Current version supports only indian system. But, subsequent versions will support international version.| | 2. Commas in the test cases are just for readability, but doesn't support in the input. |


Installation:

npm i currency-in-words

Usage:

import { convert } from 'currency-in-words'

const result = convert('777')

Refer the images(test-cases) for more insight.

Adding test-case results just to make your life easier..

As we know it's hard to define the scope of a software. The scalability it offers is also a potential danger, as we might end up in a forever loop, adding feature after feature. Hence couple of limitations has been set going forth.

  1. Ignoring all decimals after two decimal places.
  2. Never going to address/handle commas in the input.
  3. Out put for decimals is in the format 'xxx yyy zzz.xx yy' without any spaces on either sides of the period, this is probably not gonna change for the sake of backward compatability. But you can always manipulate it with a little bit of your code.

Keywords

FAQs

Package last updated on 03 Feb 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