Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@zcorky/sandbox

zcorky8MIT0.0.3TypeScript support: included

A simplae safe sandbox in browser/server

zcorky, sandbox, store, lockr, typescript

readme

sandbox

NPM version NPM quality Coverage Status Dependencies Build Status Known Vulnerabilities NPM download license issues

A minimal API wrapper for localsandboxs, inspired by tsironis/lockr and marcuswestin/store.js. It is written fully with Typescript.

  • 🕒 Simple API, Easy to Use
  • 🔥 TypeScript

Install

$ npm install @zcorky/sandbox

Usage

import createSandbox from '@zcorky/sandbox';

// prepare raw 
const code = `return a + b`;

// create sandbox
const sandbox = createSanbox(code);

// run sandbox
sandbox({ a: 1, b: 2 }); // => 3

API

License

MIT © Moeover