🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

mathml2asciimathjs

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mathml2asciimathjs

Library to convert MathML to AsciiMath

1.0.15
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

mathml2asciimathjs

mathml2asciimathjs is a JavaScript library that converts MathML to ASCII math notation. This library is a direct port of a public Ruby library to JavaScript/TypeScript, enabling easy integration into web projects and applications to work seamlessly with both mathematical markup languages. It is a not a full complete conversion lib, so if you want to extend our funcionalities, feel free!

Installation

You can install mathml2asciimathjs using npm:

npm install mathml2asciimathjs

Or yarn:

yarn install mathml2asciimathjs

Usage

To use asciimath2mathmljs in your project, you can follow this basic example:

const { MathML2AsciiMath } = require('mathml2asciimathjs');

// Example conversion
const mathML = '<math>...</math>';
const conversor = new MathML2AsciiMath();
const asciiMath = conversor.convert(mathML);

console.log(asciiMath); // it will print a tranlated asciimath formula

Credits

This library is inspired by and based on the original Ruby library. The JavaScript/TypeScript version was created to provide the same functionality for projects running in JavaScript environments.

TO-DO's

  • Implement automated tests to ensure reliability and ease future development.
  • Extend library to support more tags. We encourage the community to contribute by submitting a PR or creating an issue for discussion.

Keywords

mathml

FAQs

Package last updated on 28 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts