npm.io
0.0.7 • Published 8 years ago

require-files

Licence
ISC
Version
0.0.7
Deps
2
Vulns
0
Weekly
0
Stars
1

require-files

Require files with wildcards

Install

$ npm install require-files --save

Methods

get(includePaths, excludePaths)

It returns an array with every file found based on a wildcard string. excludePaths are not required.

const files = require('require-files').get('my/path/**/*.js');    
only(includePaths, excludePaths)

requires all files (without returning) found based on a wildcard string. excludePaths are not required.

require('require-files').only('my/path/**/*.js');    

Keywords