Eigenmath in TypeScript with EcmaScript modules
npm install @geometryzen/eigenmathtsEigenmath in TypeScript with EcmaScript modules




eigenmathts is a Javascript program for evaluating Eigenmath scripts in a browser.
Scripts are read from document.getElementById("stdin").value
Results are written to document.getElementById("stdout").innerHTML
For a STEMCstudio example (click here to try)
``html
`
`typescript
import { run } from '@geometryzen/eigenmathts'
const stdin = document.getElementById("stdin") as HTMLTextAreaElement
stdin.value = [
f=sin(x)/x,f
,yrange=(-1,1)
,draw(f,x)
].join('\n').trim()
const btnRun = document.getElementById("btn-run") as HTMLElement
btnRun.onclick = run
window.onunload = function() {
// Write your application cleanup code here.
}
// Used to ensure that this file is treated as a module.
export { }
``