felixge/node-sandboxed-module — pull request #42 by OliverJAsh (2014-11-16 13:12:02+00:00)
Title: Copy sandbox options when recursing

See https://github.com/felixge/node-sandboxed-module/issues/41.

Given:

``` js
var SandboxedModule = require('sandboxed-module');

SandboxedModule.require('./foo', { sourceTransformers: {
test: function (source) {
console.log('test source transformer:', this.filename);
return source;
}
}});
```

I would expect that any calls to require inside of the sandboxed module would carry the same options (e.g. `sourceTransformers`) as the initial sandboxed module.