UNPKG

doff

Version:

A powerful tool to free your objects and arrays from unwanted content

16 lines (11 loc) 329 B
// Load modules const Fs = require('fs'); const Path = require('path'); // Internal logic Fs.readdirSync(__dirname).forEach((file) => { if (file === 'index.js') { return; // Skip iteration } // eslint-disable-next-line global-require exports[Path.basename(file, '.js')] = require(Path.join(__dirname, file)); });