UNPKG

blocklancer.git

Version:

Freelancer React Job Board using Bot and Blockchain Technology

16 lines (15 loc) 390 B
const path = require('path'); const fs = require('fs'); module.exports = absPath => { absPath = absPath || path.resolve('src'); let alias = {}; const paths = fs .readdirSync(absPath) .filter(f => /^[a-zA-Z0-9\\-_]+$/g.test(f)); paths.forEach(f => { if (!alias.hasOwnProperty(f)) { alias[f] = path.resolve(absPath, f); } }); return alias; };