Repository URL to install this package:
|
Version:
2.1.16 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const exotic_1 = require("exotic");
function toValidHTML(html) {
return exotic_1.fromIshToString(html);
}
exports.toValidHTML = toValidHTML;
function convertAsPrice(price) {
const trimPrice = exotic_1.fromIshToString(price + '');
if (trimPrice) {
const priceAsNumber = '$' + exotic_1.fromIshToNumber(trimPrice);
return priceAsNumber + (priceAsNumber.indexOf('.') === -1 ? '.00' : '');
}
return trimPrice;
}
exports.convertAsPrice = convertAsPrice;