The short answer is NO.
Although the ECMAScript specifications are available in the specification specification in the configuration environment setting for the module, it is indicated that this should not be available programmatically.
ECMAScript cannot directly access or manipulate these values [spec]
.
var registry = {
x: function () {},
y: function () {},
};
module.exports = function (prop) {
return registry[prop];
};
, .
, , .
var that = this;
that.x = function () {};
that.y = function () {};
module.exports = function (prop) {
return that[prop];
};