mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
just export the extras; don't attach them to the built-in fs module
This commit is contained in:
parent
d78b10a890
commit
e0ffe52411
@ -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];
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user