javascript - List all global variables in Node.js -
i'm trying list of global variables, including refering built-in objects.
in chrome's console can type this , keys, including things string, number, etc.
however when in node.js less:
> object.keys(this) [ 'global', 'process', 'global', 'root', 'buffer', 'settimeout', 'setinterval', 'cleartimeout', 'clearinterval', 'setimmediate', 'clearimmediate', 'console', 'module', 'require', '_' ] > this.eval [function: eval] where this.eval coming from?
the built-in properties of global object non-enumerable, object.keys doesn't return them. can use object.getownpropertynames instead.
Comments
Post a Comment