Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
currency-code-symbol-map
Advanced tools
Readme
Utility functions for currency symbols and codes.
$ npm i currency-code-symbol-map
or
$ yarn install currency-code-symbol-map
It contains four utility functions along with a mapping of currency codes and symbols.
A Symbol may belong to multiple codes. For example symbol for USD (US Dollar) and CAD (Canadian Dollar) is same, which is $. So this method returns an array of codes.
import { getCodesFromSymbol } from "currency-code-symbol-map";
console.log(getCodesFromSymbol('₹'))
// INR
If
import { getSymbolFromCode } from "currency-code-symbol-map";
console.log(getSymbolFromCode('USD'))
// $
console.log(getCodeFromSymbol('SOME INVALID SYMBOL'));
// undefined
import { isValidCurrencySymbol } from "currency-code-symbol-map";
console.log(isValidCurrencySymbol('$'))
// true
console.log(isValidCurrencySymbol('%'));
// false
import { isValidCurrencyCode } from "currency-code-symbol-map";
console.log(isValidCurrencyCode('USD'))
// true
console.log(isValidCurrencyCode('XYZ'));
// false
FAQs
Utility functions to map currency code to symbol and vice versa
The npm package currency-code-symbol-map receives a total of 112 weekly downloads. As such, currency-code-symbol-map popularity was classified as not popular.
We found that currency-code-symbol-map 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.