UNPKG
hangouts-js
Version:
latest (0.0.7)
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
Google Hangouts in node
www.dogtag.ir/projects/hangouts-js
hangouts-js
/
lib
/
util.js
17 lines
(12 loc)
•
249 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
'use strict'
;
var
vm =
require
(
'vm'
);
module
.
exports
.
evalInSandbox
=
function
evalInSandbox
(
text
) {
var
sandbox = {
window
: { },
document
: { } }; vm.
runInNewContext
(text, sandbox,
'google-bgresponse'
);
return
sandbox; };