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]; +});