
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
iso-currency
Advanced tools
AngularJS filter that retrieves currency symbols according to ISO 4217 currency codes.
AngularJS filter that retrieves currency symbols according to ISO 4217 currency codes.
npm install iso-currency
bower install iso-currency
'isoCurrency'
to your angular.module dependency, usually in app.jshttp://jsfiddle.net/nqf0ye00/55/
Instead of directly using the currency symbol, you only need the 3 char long currency code (e.g. USD or JPY). It will take the right symbol, format and fraction size. The latter can be overridden by providing an explicity fraction size value after the currency field (see below).
// in controller
$scope.amount = 50.50;
$scope.currency = 'USD';
// in template
{{ amount | isoCurrency:currency }} // $50.50
{{ amount | isoCurrency:currency:0 }} // $50
If you need the currency symbol only, you can just additionally add isoCurrency.common in your app.js, and then you can use iso4217.getCurrencyByCode() method directly.
currency = iso4217.getCurrencyByCode('EUR')
currency == {text: "Euro", fraction: 2, symbol: "€"}
This will return an object so that you just specify currency.symbol to access the symbol value.
gulp watch
and get startedgulp && testem ci
to start the tests## Currency reference
Mainly taken from the list of https://en.wikipedia.org/wiki/ISO_4217. If something is missing, feel free to create a PR.
FAQs
AngularJS filter that retrieves currency symbols according to ISO 4217 currency codes.
The npm package iso-currency receives a total of 4,655 weekly downloads. As such, iso-currency popularity was classified as popular.
We found that iso-currency 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
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.