# glob-expander

> expand a glob into an equivalent list of subdirectories

Latest version **0.0.3** (published 2014-06-26) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2014-06-26 |
| First published | 2014-06-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Austin Montoya |
| Maintainers | grrizzly |
| Keywords | glob, files, directories |

## Links

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

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.0.3 (latest) — 2014-06-26
- 0.0.2 — 2014-06-26
- 0.0.1 — 2014-06-26

## README

# Glob expander
Expand your globs into an equivalent list of directories.

This was primarily created to work around the [gaze issue](https://github.com/shama/gaze/pull/103) that prevents files being added in subdirectories from being picked up as part of the watch process.

Note that this does not attempt to expand more complex minimatch patterns, like those including brackets or negations; instead, it returns the original pattern as part of the result.

Installs via npm: 

```bash
npm install glob-expander
```

## Example

Given the following directory structure:
```

gulpfile.js
public/
 js/
   app/
	   foo.js
   test/
     bar.js
server/
  routes/
		r1.js
		r2.js
```

In `gulpfile.js`:

```javascript
var expandGlob = require('glob-expander');

// Expand a single glob
expandGlob('public/**/*.js'); // ['public/js/*.js', 'public/js/app/*.js', 'public/js/test/*.js'] 

// Expand multiple globs 
expandGlob(['public/**/*.js', 'server/**']); 
// ['public/js/*.js', 'public/js/app/*.js', 'public/js/test/*.js', 'server/*', 'server/routes/*'] 
```

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