New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

stringnum

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stringnum

Convert numbers to strings of their spelled out words for currency or general usage.

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

StringNum.js

JavaScript library for converting a number to words.

Install

$ npm install stringnum

Usage

import { IStringNum, StringNum } from 'stringnum';

const sn: IStringNum = new StringNum();
cont nbr: number = 123;
const nbrstr: string = sn.toWords(nbr, true);
console.log(nbrstr);

Output: "One-hundred Twenty-three and no/100"

API

toWords(num, formatFinancial)

num
Type: number
The number to be converted to a textual string value.

formatFinancial
Type: boolean
Default: true
Indicates whether or not to format the textual string using financial formatting.

Keywords

currency

FAQs

Package last updated on 14 Jun 2025

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