From e0ffe52411d0d885e814e4ab407f99a336f0392c Mon Sep 17 00:00:00 2001 From: Jeff Williams Date: Thu, 2 May 2013 19:59:17 -0700 Subject: [PATCH] just export the extras; don't attach them to the built-in fs module --- lib/jsdoc/fs.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/jsdoc/fs.js b/lib/jsdoc/fs.js index 7d26ad72..ee365a8d 100644 --- a/lib/jsdoc/fs.js +++ b/lib/jsdoc/fs.js @@ -3,18 +3,12 @@ * @module jsdoc/fs */ -var fs = require('fs'); +var fs = exports.fs = require('fs'); var vm = require('jsdoc/util/vm'); -var hasOwnProp = Object.prototype.hasOwnProperty; - -// add the VM-specific implementations of the extra methods +// export the VM-specific implementations of the extra methods // TODO: document extra methods here var extras = vm.getModule('fs'); -for (var func in extras) { - if ( hasOwnProp.call(extras, func) ) { - fs[func] = extras[func]; - } -} - -module.exports = fs; +Object.keys(extras).forEach(function(extra) { + exports[extra] = extras[extra]; +});