mathsteps-experimental-fork
Version:
Step by step math solutions. Experimental Fork
16 lines (13 loc) • 514 B
JavaScript
import { myNodeToString } from '../newServices/nodeServices/myNodeToString.js';
import { parseText } from '../newServices/nodeServices/parseText.js';
import { veryCleanEquation } from './veryCleanString.js';
const cleanEquationForShow = (str) => {
const core = (str2) => veryCleanEquation(myNodeToString(parseText(str2)));
if (str.includes("=")) {
const [left, right] = str.split("=");
return `${core(left)} = ${core(right)}`;
} else {
return core(str);
}
};
export { cleanEquationForShow };