jsadvent/lib/_pollute/index.js
2020-12-10 02:33:00 -06:00

16 lines
349 B
JavaScript

const fs = require('fs');
const path = require('path');
for (const filename of fs.readdirSync(__dirname)) {
if (filename === 'index.js' || !filename.endsWith('.js')) {
continue;
}
const resolved = path.resolve(__dirname, filename);
if (!fs.statSync(resolved).isFile()) {
continue;
}
require(resolved);
}
module.exports = true;