# @ice/sandbox

> sandbox for execute scripts

Latest version **1.1.4** (published 2022-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ice/sandbox
pnpm add @ice/sandbox
yarn add @ice/sandbox
bun add @ice/sandbox
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.4 |
| Published | 2022-04-07 |
| First published | 2020-04-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2075 |
| Maintainers | luhengchang228, sobear, clarkxia, yuanyan, rax-publisher, solojiang, chenbin93, maoxiaoke |
| Keywords | sandbox, icestark |

## Links

- npm: https://www.npmjs.com/package/@ice/sandbox
- Repository: https://github.com/ice-lab/icestark
- Homepage: https://github.com/ice-lab/icestark#readme
- Issues: https://github.com/ice-lab/icestark/issues
- npm.io page: https://npm.io/package/@ice/sandbox

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.1.4 (latest) — 2022-04-07
- 1.1.5-0 (beta) — 2022-08-01
- 1.1.4-0 — 2022-03-28
- 1.2.0-1 — 2021-11-15
- 1.2.0-0 — 2021-11-15
- 1.1.3 — 2021-05-20
- 1.1.2-0 — 2021-05-17
- 1.1.1 — 2021-04-14
- 1.1.1-0 — 2021-03-17
- 1.1.0 — 2021-02-25
- 1.1.0-1 — 2021-02-24
- 1.1.0-0 — 2021-02-05
- 1.0.6 — 2020-06-22
- 1.0.6-0 — 2020-06-17
- 1.0.5 — 2020-06-09
- … 9 more at https://npm.io/package/@ice/sandbox/versions

## README

# @ice/sandbox

> icestark sandbox solution. [icestark docs](https://ice-lab.github.io/icestark/).

[![NPM version](https://img.shields.io/npm/v/@ice/sandbox.svg?style=flat)](https://npmjs.org/package/@ice/sandbox) [![Package Quality](https://npm.packagequality.com/shield/@ice%2Fsandbox.svg)](https://packagequality.com/#?package=@ice%2Fsandbox) [![build status](https://img.shields.io/travis/ice-lab/icestark.svg?style=flat-square)](https://travis-ci.org/ice-lab/icestark) [![Test coverage](https://img.shields.io/codecov/c/github/ice-lab/icestark.svg?style=flat-square)](https://codecov.io/gh/ice-lab/icestark) [![NPM downloads](http://img.shields.io/npm/dm/@ice/sandbox.svg?style=flat)](https://npmjs.org/package/@ice/sandbox) [![David deps](https://img.shields.io/david/ice-lab/icestark.svg?style=flat-square)](https://david-dm.org/ice-lab/icestark)

## Installation

```bash
$ npm install @ice/sandbox --save
```

## Usage

```js
import Sandbox from '@ice/sandbox';

const sandbox = new Sandbox();

// execute scripts in sandbox
sandbox.execScriptInSandbox('window.a = 1;console.log(window.a);');

// clear side effects added by sandbox, such as addEventListener, setInterval
sandbox.clear();
```

## Inspiration

`@ice/sandbox` is inspired by [tc39/proposal-realms](https://github.com/tc39/proposal-realms), [realms-shim](https://github.com/Agoric/realms-shim) and [qiankun sandbox](https://github.com/umijs/qiankun).

## Contributors

Feel free to report any questions as an [issue](https://github.com/ice-lab/icestark/issues/new), we'd love to have your helping hand on `icestark`.

If you're interested in `icestark`, see [CONTRIBUTING.md](https://github.com/alibaba/ice/blob/master/.github/CONTRIBUTING.md) for more information to learn how to get started.

## License

[MIT](LICENSE)

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