Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/varharrie/simple_sandbox
- Owner: varHarrie
- License: mit
- Created: 2022-02-24T08:04:17.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-03-15T11:47:03.000Z (over 2 years ago)
- Last Synced: 2024-11-17T14:12:17.416Z (2 days ago)
- Topics: deno, sandbox
- Language: TypeScript
- Homepage: https://deno.land/x/simple_sandbox
- Size: 4.88 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
```