glob+
A glob that learned to read.
Same as glob but also returns the content and stats of the file.
Installation
npm install --save glob-plus
Quickstart
const glob = const plus = glob plus plus plus
API
glob.plus([pattern][, options])
pattern
<String>
: optional; the pattern to be matched; default:'**'
options
<Object>
: optional; the glob options; default:{ nodir: true }
- returns an
<EventEmitter>
with the following events:file
<Object>
: when a file was matched, statted, and readname
<String>
: the file namestats
<Stats>
: the file statsdata
<Buffer>
: the file content
error
<Error>
: when an error occcured while matching, statting, or readingend
<>
: when matching, statting, and reading has finished
glob.read([pattern][, options])
Same as glob.plus(..)
but does not return file stats
.
glob.stats([pattern][, options])
Same as glob.plus(..)
but does not return file data
.
License
WTFPL – Do What the F*ck You Want to Public License.
Made with ❤️ by @MarkTiedemann.