Skip to content

Repository files navigation

Maniaplanet Formatting Utilities

UMD/ESM TypeScript port of maniaplanet-style-js-parser with some tweaks.

Installation

$ npm i -S @altrd/mpformat

Usage

In node.js or browser via webpack/parcel/etc:

// node.jsconst{ parse, toHTML, toPlainText }=require('@altrd/mpformat')// webpack/parcel/etc (TypeScript supported)import{parse,toHTML,toPlainText}from'@altrd/mpformat'consthtml=toHTML(parse('$f00Red'))// => '<span style="color: #ff0000;">Red</span>'consttext=toPlainText(parse('$f00Red'))// => 'Red'

In the browser via unpkg

<scriptsrc="https://unpkg.com/@altrd/mpformat"></script>
MPFormat.toHTML(MPFormat.parse('$f00Red'))

About

Rewrite of maniaplanet/maniaplanet-style-js-parser

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages