Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,001 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
var vm = require('vm') | ||
var fs = require('fs') | ||
var path = require('path') | ||
|
||
var shared = require('./shared'); | ||
var ind = fs.readFileSync(__dirname + '/other.js', 'utf8'); | ||
var filename = path.resolve(__dirname + '/other.js'); | ||
var script = vm.createScript(ind, filename); | ||
script.runInNewContext({ require: require, __filename: filename }); | ||
|
||
module.exports = exports = shared; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
var shared = require('./shared'); | ||
shared.object = { name: 1, age: -1 }; | ||
shared.array = ['name'] | ||
shared.string = 'woot' | ||
shared.string2 = String('woot') | ||
shared.number = 3 | ||
shared.number2 = Number(3) | ||
shared.bool = true | ||
shared.bool2 = Boolean(true) | ||
shared.date = new Date; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
module.exports = exports = {}; |
Oops, something went wrong.