Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
"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;