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
|
* @module jsdoc/fs
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var fs = require('fs');
|
var fs = exports.fs = require('fs');
|
||||||
var vm = require('jsdoc/util/vm');
|
var vm = require('jsdoc/util/vm');
|
||||||
|
|
||||||
var hasOwnProp = Object.prototype.hasOwnProperty;
|
// export the VM-specific implementations of the extra methods
|
||||||
|
|
||||||
// add the VM-specific implementations of the extra methods
|
|
||||||
// TODO: document extra methods here
|
// TODO: document extra methods here
|
||||||
var extras = vm.getModule('fs');
|
var extras = vm.getModule('fs');
|
||||||
for (var func in extras) {
|
Object.keys(extras).forEach(function(extra) {
|
||||||
if ( hasOwnProp.call(extras, func) ) {
|
exports[extra] = extras[extra];
|
||||||
fs[func] = extras[func];
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = fs;
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user