UNPKG

gros-bras-shared

Version:

This holds all shared files such as interfaces or helpers used by Gros Bras, both frontoffices and baackoffices, and backend etc...

13 lines (12 loc) 423 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatPrices = void 0; var formatPrices = function (price) { var strPrice = '' + Math.ceil(price); var newPrice = ''; for (var i = strPrice.length; i > 0; i -= 3) { newPrice = strPrice.slice(Math.max(i - 3, 0), i) + ' ' + newPrice; } return newPrice.trim(); }; exports.formatPrices = formatPrices;