1.0.4 • Published 1 year ago

redir v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

REDir - iterative REcursive readDIR

GitHub npm

no dependencies, no recursion, tiny, fast and simple

Installation

npm install redir

Usage

const REDir = require('redir')
or
import * as REDir from "redir"

const options = {
    withStat: Boolean,
    fileOnly: Boolean,
    directoryOnly: Boolean
}
const items = REDir('./target-path', options)
console.log(items)
// withStat: false  => [path, path, ...]
// withStat: true   => {path: stat, path: stat, ...}