UNPKG

mathpix-markdown-it

Version:

Mathpix-markdown-it is an open source implementation of the mathpix-markdown spec written in Typescript. It relies on the following open source libraries: MathJax v3 (to render math with SVGs), markdown-it (for standard Markdown parsing)

28 lines 739 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getChargeText = void 0; /** * Translate the integer indicating the charge to the appropriate text. * @param {Number} charge The integer indicating the charge. * @returns {String} A string representing a charge. */ function getChargeText(charge) { // console.log('in the utility version of getChargeText'); if (charge === 1) { return '+'; } else if (charge === 2) { return '2+'; } else if (charge === -1) { return '-'; } else if (charge === -2) { return '2-'; } else { return ''; } } exports.getChargeText = getChargeText; //# sourceMappingURL=UtilityFunctions.js.map