PageSourceSearch

https://theeagle.news/wp-content/plugins/paywallproject/assets/frontend/js/core/money.js?ver=3.1.0

js theeagle.news collected 2026-10-09 17:36:08 UTC 1,297 bytes, 39 lines download raw bytes

1(function () {
2	'use strict';
3
4	window.ppaccessCore = window.ppaccessCore || {};
5
6	window.ppaccessCore.money = {
7		format: function (formatConfig, cents, currency) {
8			var amount = Math.max(0, parseInt(cents || 0, 10)) / 100;
9			var normalizedCurrency = String(currency || 'usd').toUpperCase();
10			var format = formatConfig || {};
11			var decimals = parseInt(format.decimals, 10);
12			if (isNaN(decimals)) {
13				decimals = 2;
14			}
15			decimals = Math.max(0, Math.min(6, decimals));
16
17			var parts = amount.toFixed(decimals).split('.');
18			var thousand = typeof format.thousand_separator === 'string' ? format.thousand_separator : ',';
19			var decimal = typeof format.decimal_separator === 'string' && format.decimal_separator !== '' ? format.decimal_separator : '.';
20			if (thousand !== '') {
21				parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, thousand);
22			}
23			var number = decimals > 0 ? parts[0] + decimal + parts[1] : parts[0];
24			var symbols = format.symbols || {};
25			var symbol = symbols[normalizedCurrency] || normalizedCurrency;
26
27			switch (format.position) {
28				case 'right':
29					return number + symbol;
30				case 'left_space':
31					return symbol + ' ' + number;
32				case 'right_space':
33					return number + ' ' + symbol;
34				default:
35					return symbol + number;
36			}
37		}
38	};
39})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.