Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctrekker/pluto-rest
A JavaScript interface for the Pluto.jl "What you see is what you REST" web API.
https://github.com/ctrekker/pluto-rest
Last synced: about 1 month ago
JSON representation
A JavaScript interface for the Pluto.jl "What you see is what you REST" web API.
- Host: GitHub
- URL: https://github.com/ctrekker/pluto-rest
- Owner: ctrekker
- Created: 2021-05-05T19:46:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-05-06T14:13:23.000Z (over 3 years ago)
- Last Synced: 2024-11-17T01:17:29.247Z (about 2 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pluto-rest
A JavaScript interface for the Pluto.jl \"What you see is what you REST\" web API.## Installation
```
npm install pluto-rest
```## Usage
The following example is based off the REST Docs.jl Pluto notebook. Also note that this example must be wrapped in an [async function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function).
```javascript
const { PlutoNotebook } = require('pluto-rest')const nb = new PlutoNotebook('REST Docs.jl')
// Evaluation
console.log(await nb.c) // prints 5
console.log(await nb({a: 5, b: 12}).c) // prints 13// Calling functions
console.log(await (await nb.distance)(3, 4, 12)) // prints 13
```