Nucleus Powered Mitochondria
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

simple-glob-observable

1.0.2 • Public • Published

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.

Install

npm i simple-glob-observable

DownloadsWeekly Downloads

2

Version

1.0.2

License

MIT

Last publish

Collaborators

  • avatar