MCPcopy Create free account
hub / github.com/apache/cloudstack / currencyFilter

Function currencyFilter

tools/ngui/static/js/lib/angular.js:9826–9833  ·  view source on GitHub ↗
($locale)

Source from the content-addressed store, hash-verified

9824 */
9825currencyFilter.$inject = ['$locale'];
9826function currencyFilter($locale) {
9827 var formats = $locale.NUMBER_FORMATS;
9828 return function(amount, currencySymbol){
9829 if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;
9830 return formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).
9831 replace(/\u00A4/g, currencySymbol);
9832 };
9833}
9834
9835/**
9836 * @ngdoc filter

Callers

nothing calls this directly

Calls 3

isUndefinedFunction · 0.85
formatNumberFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected