1.0.2 • Published 6 years ago

simple-glob-observable v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

glob-observable

A Simple Observable interface over node-glob.

Example

Install

npm install simple-glob-observable
const fs = require('fs')
const glob = require('simple-glob-observable')
const { map } = require('rxjs/operators/map')
const { max } = require('rxjs/operators/max')

glob('./**', { ignore: 'node_modules/**' })
  .pipe(
    map(p => ({ size: fs.statSync(p).size, path: p })),
    max((x, y) => x.size > y.size)
  )
  .subscribe(c => console.log('max size file:', c.path))

Usage

glob(pattern, options)

Options

sync: perform a synchronous glob search, default is false.

see node-glob for more details.