# node-maple

> A bridge to use Maple as computation engine for node.js applications

Latest version **0.0.2** (published 2014-05-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-maple
pnpm add node-maple
yarn add node-maple
bun add node-maple
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-05-30 |
| First published | 2014-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Sebastiaan Marynissen |
| Maintainers | sebamarynissen |
| Keywords | maple, mathematics, node |

## Links

- npm: https://www.npmjs.com/package/node-maple
- Repository: https://github.com/sebamarynissen/node-maple
- Issues: https://github.com/sebamarynissen/node-maple/issues
- npm.io page: https://npm.io/package/node-maple

## Dependencies (2)

- [underscore](https://npm.io/package/underscore.md) ~1.6.0
- [jquery-deferred](https://npm.io/package/jquery-deferred.md) ~0.3.0

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2014-05-30
- 0.0.1 — 2014-05-29

## README

node-maple
==========

Node-maple is a bridge between Node.js and the computer algebra system [Maple](www.maplesoft.com)

Install using
```
npm install node-maple
```
and use as
```javascript
var Maple = require('node-maple');
var slave = new Maple('/path/to/maple/cli/executable');
```

From then on, you can use the main function Maple.queue() as

```javascript
slave.queue('restart:').then(function() {
  return slave.queue('a := Pi:');
}).then(function() {
  return slave.queue('f := x -> x^2:');
}).then(function() {
  // Note that you must use a semi-colon (;), otherwise Maple
  // won't output the result!
  // Alose, you MUST use evalf(), otherwise Maple just outputs Pi^2
  return slave.numeric('evalf(f(a))^2;');
}).then(function(a) {
  // From here on you can use the value of a in your script
  console.log('Pi squared equals ' + a);
});

// Don't forget to quit after you're done, otherwise it will keep on running!
slave.quit();
```

If you expect a statement to output a numerical value, use Maple.numeric() to automatically parse it to a numeric value.
Using Maple.queue() would only result in the raw output that Maple provided.
You can use this however to write your own parser, which parses algebraic output to JavaScript functions for example.

Also, a few functions are built in, such as Maple.restart(), Maple.int() and Maple.diff().
Take a look at example.js for more info.

I know that the functionality is pretty basic, however, the Maple.queue() method should get you pretty far.
Also, I mainly made this for my own interest, so I don't think I will actively work on this project, but feel free to post suggestions and pull requests!

---
_Source: https://npm.io/package/node-maple · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
