# crossvm

> Browser compatible Node VM

Latest version **0.0.9-beta** (published 2018-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install crossvm
pnpm add crossvm
yarn add crossvm
bun add crossvm
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.9-beta |
| Published | 2018-02-08 |
| First published | 2018-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 105.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Parsa Ghadimi |
| Maintainers | qti3e |
| Keywords | vm, transpiler |

## Links

- npm: https://www.npmjs.com/package/crossvm
- Repository: https://github.com/Qti3e/crossvm
- Homepage: https://github.com/Qti3e/crossvm#readme
- Issues: https://github.com/Qti3e/crossvm/issues
- npm.io page: https://npm.io/package/crossvm

## Dependencies (1)

- [acorn](https://npm.io/package/acorn.md) ^5.3.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.9-beta (latest) — 2018-02-08
- 0.0.8 — 2018-02-06
- 0.0.7-rc4 — 2018-02-06
- 0.0.7-rc3 — 2018-02-06
- 0.0.7-rc2 — 2018-02-06
- 0.0.7-rc1 — 2018-02-06
- 0.0.7 — 2018-02-05
- 0.0.5 — 2018-02-04
- 0.0.3 — 2018-02-04
- 0.0.2 — 2018-02-04
- 0.0.1 — 2018-02-04

## README

# Cross VM
Browser compatible Node VM  

By using this library you will be able to containerize JS codes and evaluate
 the codes in the browser  

# Install
Sadly for now you can only use NPM to use this package.  
(Webpack-bundle is coming)  
```bash
npm install --save crossvm
```  

# Testing
Writing tests is in progress

# Example
Look at Node's VM [official documentation](https://nodejs.org/api/vm.html)

# Note  
CrossVM is not a security mechanism. Do not use it to run untrusted code.  
There is always a way to get out of sandbox like:
```js
const {createContext, run} = require('crossvm');
const context = createContext();
run('"".constructor.constructor("return this")().console.log=()=> { throw new Error("pwnd");}', context);
console.log("Hello world");
```
(Thanks to [Dark Marouane](https://www.reddit.com/user/dark-marouane) for clarifying this)

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