mirror of
https://github.com/goldbergyoni/nodebestpractices.git
synced 2025-11-03 03:36:26 +08:00
Update sections/security/sandbox.chinese.md
Co-Authored-By: MattJin <matt_jin@163.com>
This commit is contained in:
@ -11,7 +11,8 @@
|
||||
### 代码示例 - 使用Sandbox库运行隔离代码
|
||||
|
||||
```javascript
|
||||
const Sandbox = require("sandbox")
|
||||
const Sandbox = require("sandbox");
|
||||
const s = new Sandbox();
|
||||
, s = new Sandbox()
|
||||
|
||||
s.run( "lol)hai", function( output ) {
|
||||
@ -30,4 +31,4 @@ s.run( "while (true) {}", function( output ) {
|
||||
console.log(output);
|
||||
//output='Timeout'
|
||||
})
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user