Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/varharrie/simple_sandbox

Provides a simple sandbox environment to execute javascript code.
https://github.com/varharrie/simple_sandbox

deno sandbox

Last synced: about 5 hours ago
JSON representation

Provides a simple sandbox environment to execute javascript code.

Awesome Lists containing this project

README

        

# simple_sandbox for Deno

Provides a simple sandbox environment to execute javascript code.

## Usage

```javascript
import { Sandbox } from "https://deno.land/x/simple_sandbox/mod.ts";

const code = `
export default function (n, m) {
return n + m;
}
`;

const sandbox = new Sandbox();

const result = await sandbox.execute({
code,
args: [2, 3],
timeout: 1500,
});

console.log(result); // 5
```