sanitize-latex
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

sanitize-latex

Sanitize hazardous LaTeX symbols from your strings.

Install

npm install sanitize-latex

Usage

const sanitize = require('sanitize-latex')
 
const unsanitizedString = '\\ ${Hello} %there^'
const sanitizedString = sanitize(unsanitizedString)
 
console.log(sanitizedString) // \textbackslash{} \$\{Hello\} \%there\textasciicircum{}

API

sanitize(str)

str {String}

The LaTeX string to be normalized.

License

MIT

Package Sidebar

Install

npm i sanitize-latex

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

3.34 kB

Total Files

5

Last publish

Collaborators

  • saadq