UNPKG

tm-text

Version:

Trackmania and Maniaplanet text parser and formatter

39 lines (38 loc) 1.72 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.tmText = void 0; const blockify_1 = require("./modules/blockify"); const htmlify_1 = require("./modules/htmlify"); const humanize_1 = require("./modules/humanize"); const tokenize_1 = require("./modules/tokenize"); const tmText = (input, options) => { const tokens = (0, tokenize_1.tokenize)(input, options); return Object.freeze({ blockify: () => (0, blockify_1.blockify)(tokens, options), htmlify: () => (0, htmlify_1.htmlify)(tokens, options), humanize: () => (0, humanize_1.humanize)(tokens, options), tokenize: () => tokens, }); }; exports.tmText = tmText; __exportStar(require("./modules/blockify"), exports); __exportStar(require("./modules/htmlify"), exports); __exportStar(require("./modules/humanize"), exports); __exportStar(require("./modules/tokenize"), exports); __exportStar(require("./utils/options"), exports); __exportStar(require("./utils/syntax"), exports); exports.default = exports.tmText;