Readers
Readers is a folder traversal package, Can be more simple to load the file into your Node.js project.
example:
npm install --save readers
'use strict';
const readers = require("readers");
readers('folder', options, (files) => {
console.log(files)
})readers([path], {options}, callback)
Path is string or array, more. callback return a object.
// example array:
readers([dirname, '../', '../../other'], options, callback)
// example string:
readers(dirname, '../', '../../other', options, callback)
// example string and array:
readers(dirname, '../', ['./a', './b'], options, callback)options:
-
ignoresArray File filtering -
everyBoolean Read subfolders -
callbackOptionsObject- relative Boolean returns relative path
- name Boolean returns file name
- extension Boolean returns file extension