Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
currency-symbol
Advanced tools
A simple lightweight package that returns a country currency numeric symbol and also list all countries currency
A simple lightweight zero dependency package that returns a country currency numeric symbol and can also list all countries currency.
npm install currency-symbol
//ES5
const currencySymbol = require('currency-symbol');
// ES6
import currencySymbol from 'currency-symbol';
console.log(currencySymbol.all());
// This will return all curriencies symbol
console.log(currencySymbol.symbol("United States")); //$
// This will return '$' which is $.
console.log(currencySymbol.symbol("USD")); //$
// This will return '$' which is $.
console.log(currencySymbol.symbol("Dollar")); //$
// This will return '$' which is $.
console.log(currencySymbol.symbol("Nigeria")); //₦
// This will return '₦' which is ₦.
console.log(currencySymbol.symbol("NGN")); //₦
// This will return '₦' which is ₦.
console.log(currencySymbol.symbol("Naira")); //₦
// This will return '₦' which is ₦.
console.log(currencySymbol.symbol("GHC")); //¢
// This will return '¢' which is ¢
console.log(currencySymbol.symbol("Ghana")); //¢
// This will also return '¢' which is ¢
console.log(currencySymbol.symbol("Cedis")); //¢
// This will also return '¢' which is ¢.
/***
* Note: the .symbol() function takes any of this arguments - Country Name, Currency Name and Currency Abbreviation and return the currency symbol.
***/
function | argument | response | ||
---|---|---|---|---|
.all() | none | it returns all currency symbol | ||
.symbol(name) | name(Country Name or Currency Name or Currency Abbreviation) | it returns a symbol for a particular country or currency . |
scope should be something specific to the commit change e.g logo
subject text should:
Message body (optional) If a body is to be written, it should:
Message Footer This should be used for referencing the issues using the following keywords: Start, Delivers, Fixes and Finishes. It should be written as:
This project is authored by Philips Blessing and is licensed for your use, modification and distribution under the MIT license.
FAQs
A simple lightweight package that returns a country currency numeric symbol and also list all countries currency
The npm package currency-symbol receives a total of 7,337 weekly downloads. As such, currency-symbol popularity was classified as popular.
We found that currency-symbol 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.