mirror of https://github.com/nodejs/node.git
repl: fix lint
parent
9bce5e8f3e
commit
bac537b186
|
@ -329,15 +329,15 @@ REPLServer.prototype.createContext = function() {
|
||||||
|
|
||||||
// make built-in modules available directly
|
// make built-in modules available directly
|
||||||
// (loaded lazily)
|
// (loaded lazily)
|
||||||
exports._builtinLibs.forEach(function(name){
|
exports._builtinLibs.forEach(function(name) {
|
||||||
Object.defineProperty(context, name, {
|
Object.defineProperty(context, name, {
|
||||||
get: function(){
|
get: function() {
|
||||||
var lib = require(name);
|
var lib = require(name);
|
||||||
context._ = context[name] = lib;
|
context._ = context[name] = lib;
|
||||||
return lib;
|
return lib;
|
||||||
},
|
},
|
||||||
// allow the creation of other globals with this name
|
// allow the creation of other globals with this name
|
||||||
set: function(val){
|
set: function(val) {
|
||||||
delete context[name];
|
delete context[name];
|
||||||
context[name] = val;
|
context[name] = val;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue