Skip to content

Commit 237a5e0

Browse files
committed
docs: update readme
1 parent 8f53278 commit 237a5e0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in mo
2424
Try it yourself:
2525

2626
```js
27-
const vm = require('vm');
27+
import { runInNewContext } from "node:vm";
2828

29-
vm.runInNewContext('this.constructor.constructor("return process")().exit()');
29+
runInNewContext('this.constructor.constructor("return process")().exit()');
3030
console.log('Never gets executed.');
3131
```
3232

@@ -39,8 +39,6 @@ new VM().run('this.constructor.constructor("return process")().exit()');
3939

4040
## Installation
4141

42-
**IMPORTANT**: VM2 requires Node.js 6 or newer.
43-
4442
```sh
4543
npm install vm2
4644
```

0 commit comments

Comments
 (0)