# pull-glob

> extended globs as pull-streams

Latest version **1.0.7** (published 2018-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install pull-glob
pnpm add pull-glob
yarn add pull-glob
bun add pull-glob
```

Provides the command `pull-glob`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2018-03-29 |
| First published | 2013-05-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Dominic Tarr |
| Maintainers | dominictarr |

## Links

- npm: https://www.npmjs.com/package/pull-glob
- Repository: https://github.com/dominictarr/pull-glob
- Issues: https://github.com/dominictarr/pull-glob/issues
- npm.io page: https://npm.io/package/pull-glob

## Dependencies (2)

- [pull-fs](https://npm.io/package/pull-fs.md) ~1.1.6
- [pull-stream](https://npm.io/package/pull-stream.md) ^3.3.0

## Recent versions

- 1.0.7 (latest) — 2018-03-29
- 1.0.6 — 2016-04-10
- 1.0.5 — 2016-04-10
- 1.0.4 — 2016-04-09
- 1.0.3 — 2016-04-09
- 1.0.2 — 2016-03-23
- 1.0.1 — 2013-06-27
- 1.0.0 — 2013-05-05

## README

# pull-glob

streaming extended glob.

use with [pull-stream](https://github.com/dominictarr/pull-stream)

## examples

``` js
var pull = require('pull-stream')
var glob = require('pull-glob')

function glob_log (name, pattern) {
  pull(glob(pattern), pull.collect(function (err, ary) {
    if(err) throw err
    console.log('name:', name, 'pattern:', pattern)
    console.log(ary)
  })
}


glob_log('current dir', '.')
glob_log('js in current dir', '*.js')
glob_log('everything under current dir', '**')
glob_log('all js under current dir', '**/*.js')
glob_log('parent directories', '...')
glob_log('hidden files', '.../.*')
glob_log('available modules', '.../node_modules/*')
glob_log('local package files', '.../{package,component}.json')
```

## stopping early

because this module uses pull-streams, it's lazy,
so you can do queries like the following:

``` js
//find the first package.json in a parent directory.
pull(glob('.../package.json'), pull.take(1), log())
```

And you will retrive only the first item, and _will
not do any extra IO_. This is hugely useful when
doing a large traversal...

## collect node_module tree

``` js
pull(
  glob('**/node_modules/*/package.json'),
  pull.collect(function (e, arr) {
    console.log(arr)
  })
)
```

## License

MIT

---
_Source: https://npm.io/package/pull-glob · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
