readers
v1.0.3
Published
Readers is a folder traversal package, Can be more simple to load the file into your Node.js project.
Downloads
7
Readme
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:
ignores
Array File filteringevery
Boolean Read subfolderscallbackOptions
Object- relative Boolean returns relative path
- name Boolean returns file name
- extension Boolean returns file extension