Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
nepali-number
Advanced tools
Conversion and transliteration of English to Nepali numbers and vice versa
Translations and formatting numbers in nepali (Devnagari) and english with unicode supports.
Using NPM:
npm i nepali-number
or, using Yarn:
yarn add nepali-number
Using ES6 import
:
import {
englishToNepaliNumber,
nepaliToEnglishNumber,
nepaliNumberFormat,
englishNumberFormat,
nepaliAmountFormat,
englishAmountFormat,
} from "nepali-number"
or, using commonJS require
const nepaliNumber = require('nepali-number')
nepaliNumber.englishToNepaliNumber("8848m")
Syntax: englishToNepaliNumber(numberString: string | number)
englishToNepaliNumber("12,34,56,789.01") // "१२,३४,५६,७८९.०१"
Syntax: nepaliToEnglishNumber(numberString: string | number)
nepaliToEnglishNumber("१२,३४,५६,७८९.०१") // "12,34,56,789.01"
Syntax: nepaliNumberFormat(numberString: string | number, [locale: string])
en
for English and ne
and Nepali (Devnagari). Default to en
nepaliNumberFormat("१२३४५६७८९") // "12,34,56,789"
nepaliNumberFormat("१२३४५६७८९", "ne") // "१२,३४,५६,७८९"
nepaliNumberFormat("123456789") // "12,34,56,789"
nepaliNumberFormat("123456789", "ne") // "१२,३४,५६,७८९"
Syntax: englishNumberFormat(numberString: string | number, [locale: string])
en
for English and ne
and Nepali (Devnagari). Default to en
englishNumberFormat("१२३४५६७८९") // "123,456,789"
englishNumberFormat("१२३४५६७८९", "ne") // "१२३,४५६,७८९"
englishNumberFormat("123456789") // "123,456,789"
englishNumberFormat("123456789", "ne") // "१२३,४५६,७८९"
Syntax: nepaliAmountFormat(numberString: string | number, [precision: number], [locale: string])
2
en
for English and ne
and Nepali (Devnagari). Default to en
nepaliAmountFormat("१२३४५६७८९.०१५४") // "12,34,56,789.02"
nepaliAmountFormat("१२३४५६७८९.०१५४", 3, "ne") // "१२,३४,५६,७८९.०१५"
nepaliAmountFormat("123456789.0154") // "12,34,56,789.02"
nepaliAmountFormat("123456789.0154", 3, "ne") // "१२,३४,५६,७८९.०१५"
Syntax: englishAmountFormat(numberString: string | number, [precision: number], [locale: string])
2
en
for English and ne
and Nepali (Devnagari). Default to en
englishAmountFormat("१२३४५६७८९.०१५४") // "123,456,789.02"
englishAmountFormat("१२३४५६७८९.०१५४", 3, "ne") // "१२३,४५६,७८९.०१५"
englishAmountFormat("123456789.0154") // "123,456,789.02"
englishAmountFormat("123456789.0154", 3, "ne") // "१२३,४५६,७८९.०१५"
FAQs
Conversion and transliteration of English to Nepali numbers and vice versa
The npm package nepali-number receives a total of 360 weekly downloads. As such, nepali-number popularity was classified as not popular.
We found that nepali-number demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.