Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geometryzen/eigenmathts
A port of eigenmath to TypeScript and EcmaScript modules
https://github.com/geometryzen/eigenmathts
Last synced: 9 days ago
JSON representation
A port of eigenmath to TypeScript and EcmaScript modules
- Host: GitHub
- URL: https://github.com/geometryzen/eigenmathts
- Owner: geometryzen
- License: mit
- Created: 2023-12-17T18:04:01.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-08T14:05:20.000Z (about 1 month ago)
- Last Synced: 2024-10-08T17:51:39.033Z (about 1 month ago)
- Language: TypeScript
- Size: 2.24 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# eigenmathts
Eigenmath in TypeScript with EcmaScript modules
[![version](https://img.shields.io/npm/v/@geometryzen/eigenmathts.svg)](https://www.npmjs.com/package/@geometryzen/eigenmathts)
[![npm downloads](https://img.shields.io/npm/dm/@geometryzen/eigenmathts.svg)](https://npm-stat.com/charts.html?package=@geometryzen/eigenmathts&from=2022-09-01)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](./CONTRIBUTING.md)
`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](https://www.stemcstudio.com/gists/aa8013930a6319728967b566c38b1eb3) to try)
```html
Run
```
```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 { }
```