summaryrefslogtreecommitdiff
path: root/lib/module.js
diff options
context:
space:
mode:
authorSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-09-17 04:43:39 +0530
committerSakthipriyan Vairamani <thechargingvolcano@gmail.com>2015-10-06 18:56:20 +0530
commit6ad458b752e2c2818244714e499e560f6e668c87 (patch)
tree78780c602184618b69fafcf0b1e0981a42257028 /lib/module.js
parent88533881dd296236a44ad36aa7afb8336298540f (diff)
downloadandroid-node-v8-6ad458b752e2c2818244714e499e560f6e668c87.tar.gz
android-node-v8-6ad458b752e2c2818244714e499e560f6e668c87.tar.bz2
android-node-v8-6ad458b752e2c2818244714e499e560f6e668c87.zip
module: remove unnecessary property and method
`require.paths` property and `require.registerExtension` function have been throwing errors when used. They both are like this for years now. This patch removes them from the system. PR-URL: https://github.com/nodejs/node/pull/2922 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/module.js')
-rw-r--r--lib/module.js10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/module.js b/lib/module.js
index 90ae6057b2..ef0fad209f 100644
--- a/lib/module.js
+++ b/lib/module.js
@@ -389,20 +389,10 @@ Module.prototype._compile = function(content, filename) {
return Module._resolveFilename(request, self);
};
- Object.defineProperty(require, 'paths', { get: function() {
- throw new Error('require.paths is removed. Use ' +
- 'node_modules folders, or the NODE_PATH ' +
- 'environment variable instead.');
- }});
-
require.main = process.mainModule;
// Enable support to add extra extension types
require.extensions = Module._extensions;
- require.registerExtension = function() {
- throw new Error('require.registerExtension() removed. Use ' +
- 'require.extensions instead.');
- };
require.cache = Module._cache;