Awesome
dirs-list
get dir path list
中文 | english
Install
npm install dirs-list
yarn add dirs-list
Usage
const dirsList = require('dirs-list');
let res = await dirsList(__dirname, {match:["*node_modules"],ignore:["*.git"]})
//=> __dirname all node_modules, ignore *.git
API
dirsList(dir, options)
dir
name: | dir |
---|
Type: | string |
Desc: | dir path |
options
match
name: | match |
---|
Type: | string |Array |
Desc: | match every, add the path |
ignore
name: | ignore |
---|
Type: | string |Array |
Desc: | ignore some, pass the path |
use by
<a href="https://patreon.com/yobrave">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="50">
</a>
License
MIT © chinanf-boy