{"_id":"bash-glob","_rev":"13305","name":"bash-glob","description":"Bash-powered globbing for node.js","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T09:58:22.000Z","created":"2016-10-02T00:13:11.014Z","2.0.0":"2017-10-22T17:30:43.099Z","1.0.2":"2017-10-22T17:29:52.678Z","1.0.1":"2017-04-27T08:58:23.377Z","1.0.0":"2017-04-27T08:47:48.616Z","0.1.1":"2016-10-02T00:33:14.341Z","0.1.0":"2016-10-02T00:13:11.014Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/micromatch/bash-glob.git"},"versions":{"2.0.0":{"name":"bash-glob","description":"Bash-powered globbing for node.js","version":"2.0.0","homepage":"https://github.com/micromatch/bash-glob","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/micromatch/bash-glob.git"},"bugs":{"url":"https://github.com/micromatch/bash-glob/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4.0"},"scripts":{"test":"mocha"},"dependencies":{"bash-path":"^1.0.1","component-emitter":"^1.2.1","cross-spawn":"^5.1.0","each-parallel-async":"^1.0.0","extend-shallow":"^2.0.1","is-extglob":"^2.1.1","is-glob":"^4.0.0"},"devDependencies":{"arr-union":"^3.1.0","array-unique":"^0.3.2","async-array-reduce":"^1.0.0","delete":"^1.1.0","glob":"^7.1.2","gulp-format-md":"^1.0.0","minimist":"^1.2.0","mkdirp":"^0.5.1","mocha":"^3.2.0"},"keywords":["bash","expand","expansion","expression","file","files","filter","find","glob","globbing","globs","globstar","match","matcher","matches","matching","micromatch","minimatch","multimatch","nanomatch","path","pattern","patterns","regex","regexp","regular","shell","wildcard"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["bash-match","braces","micromatch","nanomatch"]},"lint":{"reflinks":true}},"gitHead":"573799807795b580017d07449f2233e9051204b7","_id":"bash-glob@2.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"a8ef19450783403ed93fccca2dbe09f2cf6320dc","size":6405,"noattachment":false,"key":"/bash-glob/-/bash-glob-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bash-glob/download/bash-glob-2.0.0.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bash-glob-2.0.0.tgz_1508693442095_0.8858074429444969"},"directories":{},"publish_time":1508693443099,"_hasShrinkwrap":false,"_cnpm_publish_time":1508693443099},"1.0.2":{"name":"bash-glob","description":"Bash-powered globbing for node.js","version":"1.0.2","homepage":"https://github.com/micromatch/bash-glob","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/micromatch/bash-glob.git"},"bugs":{"url":"https://github.com/micromatch/bash-glob/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=4.0"},"scripts":{"test":"mocha"},"dependencies":{"async-each":"^1.0.1","bash-path":"^1.0.1","component-emitter":"^1.2.1","cross-spawn":"^5.1.0","extend-shallow":"^2.0.1","is-extglob":"^2.1.1","is-glob":"^4.0.0"},"devDependencies":{"arr-union":"^3.1.0","array-unique":"^0.3.2","async-array-reduce":"^1.0.0","delete":"^1.1.0","glob":"^7.1.2","gulp-format-md":"^1.0.0","minimist":"^1.2.0","mkdirp":"^0.5.1","mocha":"^3.2.0"},"keywords":["bash","expand","expansion","expression","file","files","filter","find","glob","globbing","globs","globstar","match","matcher","matches","matching","micromatch","minimatch","multimatch","nanomatch","path","pattern","patterns","regex","regexp","regular","shell","wildcard"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["bash-match","braces","micromatch","nanomatch"]},"lint":{"reflinks":true}},"gitHead":"f7181a9f0e5b1d69d40f77857b75b5e418ec70ee","_id":"bash-glob@1.0.2","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"shasum":"95ac5631fdd7a8fc569f267167a84eb831979a1b","size":6288,"noattachment":false,"key":"/bash-glob/-/bash-glob-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/bash-glob/download/bash-glob-1.0.2.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bash-glob-1.0.2.tgz_1508693391322_0.9761139061301947"},"directories":{},"publish_time":1508693392678,"_hasShrinkwrap":false,"_cnpm_publish_time":1508693392678},"1.0.1":{"name":"bash-glob","description":"Bash-powered globbing for node.js","version":"1.0.1","homepage":"https://github.com/micromatch/bash-glob","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/micromatch/bash-glob.git"},"bugs":{"url":"https://github.com/micromatch/bash-glob/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"async-each":"^1.0.1","component-emitter":"^1.2.1","cross-spawn":"^5.1.0","extend-shallow":"^2.0.1","is-extglob":"^2.1.1","is-glob":"^3.1.0"},"devDependencies":{"arr-union":"^3.1.0","array-unique":"^0.3.2","async-array-reduce":"^0.2.1","delete":"^0.3.2","glob":"^7.1.1","gulp-format-md":"^0.1.12","minimist":"^1.2.0","mkdirp":"^0.5.1","mocha":"^3.3.0"},"keywords":["bash","expand","expansion","expression","file","files","filter","find","glob","globbing","globs","globstar","match","matcher","matches","matching","micromatch","minimatch","multimatch","nanomatch","path","pattern","patterns","regex","regexp","regular","shell","wildcard"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["bash-match","micromatch","nanomatch","braces"]},"lint":{"reflinks":true}},"gitHead":"a34945fd38d8422e8a388b02efa6068ff204a0bf","_id":"bash-glob@1.0.1","_shasum":"d1bce5d2fd6875a5a2b24bdaa707c190731bc26e","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"d1bce5d2fd6875a5a2b24bdaa707c190731bc26e","size":6244,"noattachment":false,"key":"/bash-glob/-/bash-glob-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bash-glob/download/bash-glob-1.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/bash-glob-1.0.1.tgz_1493283501086_0.35832043644040823"},"directories":{},"publish_time":1493283503377,"_hasShrinkwrap":false,"_cnpm_publish_time":1493283503377},"1.0.0":{"name":"bash-glob","description":"Bash-powered globbing for node.js","version":"1.0.0","homepage":"https://github.com/jonschlinkert/bash-glob","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/bash-glob.git"},"bugs":{"url":"https://github.com/jonschlinkert/bash-glob/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"async-each":"^1.0.1","component-emitter":"^1.2.1","cross-spawn":"^5.1.0","extend-shallow":"^2.0.1","is-extglob":"^2.1.1","is-glob":"^3.1.0"},"devDependencies":{"arr-union":"^3.1.0","array-unique":"^0.3.2","async-array-reduce":"^0.2.1","delete":"^0.3.2","glob":"^7.1.1","gulp-format-md":"^0.1.12","minimist":"^1.2.0","mkdirp":"^0.5.1","mocha":"^3.3.0"},"keywords":["bash","expand","expansion","expression","file","files","filter","find","glob","globbing","globs","globstar","match","matcher","matches","matching","micromatch","minimatch","multimatch","nanomatch","path","pattern","patterns","regex","regexp","regular","shell","wildcard"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["bash-match","micromatch","nanomatch","braces"]},"lint":{"reflinks":true}},"gitHead":"91b5e5b0bfcae7df88f52f04e26cdffd85500ef1","_id":"bash-glob@1.0.0","_shasum":"a93c2400f9c4d554e0061ed0ba9f18a893cc39d2","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.7.3","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"a93c2400f9c4d554e0061ed0ba9f18a893cc39d2","size":6244,"noattachment":false,"key":"/bash-glob/-/bash-glob-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bash-glob/download/bash-glob-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bash-glob-1.0.0.tgz_1493282866650_0.7086308686994016"},"directories":{},"publish_time":1493282868616,"_hasShrinkwrap":false,"_cnpm_publish_time":1493282868616},"0.1.1":{"name":"bash-glob","description":"Bash-powered globbing for node.js","version":"0.1.1","homepage":"https://github.com/jonschlinkert/bash-glob","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/bash-glob.git"},"bugs":{"url":"https://github.com/jonschlinkert/bash-glob/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"async-each":"^1.0.1","component-emitter":"^1.2.1","cross-spawn":"^4.0.2","extend-shallow":"^2.0.1","fs-exists-sync":"^0.1.0","is-extglob":"^2.0.0","is-glob":"^3.0.0"},"devDependencies":{"arr-union":"^3.1.0","array-unique":"^0.3.2","delete":"^0.3.2","glob":"^7.1.0","gulp-format-md":"^0.1.11","mkdirp":"^0.5.1","mocha":"^3.1.0","yargs-parser":"^4.0.2"},"keywords":["bash","expand","expansion","expression","file","files","filter","find","glob","globbing","globs","globstar","match","matcher","matches","matching","micromatch","minimatch","multimatch","nanomatch","path","pattern","patterns","regex","regexp","regular","shell","wildcard"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true},"related":{"list":[]},"reflinks":["node-glob","verb","verb-generate-readme"]},"gitHead":"f5aca7b52730052ac00e2a39650a2fd3d907f05d","_id":"bash-glob@0.1.1","_shasum":"1c570167435e8f1aef1fc61993caead3da3b696b","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"1c570167435e8f1aef1fc61993caead3da3b696b","size":5517,"noattachment":false,"key":"/bash-glob/-/bash-glob-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/bash-glob/download/bash-glob-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bash-glob-0.1.1.tgz_1475368392615_0.466261864406988"},"directories":{},"publish_time":1475368394341,"_cnpm_publish_time":1475368394341,"_hasShrinkwrap":false},"0.1.0":{"name":"bash-glob","description":"Bash-powered globbing for node.js","version":"0.1.0","homepage":"https://github.com/jonschlinkert/bash-glob","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/bash-glob.git"},"bugs":{"url":"https://github.com/jonschlinkert/bash-glob/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"keywords":["bash","glob"],"dependencies":{"async-each":"^1.0.1","component-emitter":"^1.2.1","cross-spawn":"^4.0.2","extend-shallow":"^2.0.1","fs-exists-sync":"^0.1.0","is-extglob":"^2.0.0","is-glob":"^3.0.0"},"devDependencies":{"arr-union":"^3.1.0","array-unique":"^0.3.2","delete":"^0.3.2","glob":"^7.1.0","gulp-format-md":"^0.1.11","mkdirp":"^0.5.1","mocha":"^3.1.0","yargs-parser":"^4.0.2"},"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"lint":{"reflinks":true},"related":{"list":[]},"reflinks":["node-glob","verb","verb-generate-readme"]},"gitHead":"36f9c6278ad49d1c37262013bbbe18daf6fe7d9a","_id":"bash-glob@0.1.0","_shasum":"70fd1467af7de21bac051b8edcf70efa12ca86b6","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"70fd1467af7de21bac051b8edcf70efa12ca86b6","size":5420,"noattachment":false,"key":"/bash-glob/-/bash-glob-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/bash-glob/download/bash-glob-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/bash-glob-0.1.0.tgz_1475367189761_0.13591723958961666"},"directories":{},"publish_time":1475367191014,"_cnpm_publish_time":1475367191014,"_hasShrinkwrap":false}},"readme":"# bash-glob [![NPM version](https://img.shields.io/npm/v/bash-glob.svg?style=flat)](https://www.npmjs.com/package/bash-glob) [![NPM monthly downloads](https://img.shields.io/npm/dm/bash-glob.svg?style=flat)](https://npmjs.org/package/bash-glob) [![NPM total downloads](https://img.shields.io/npm/dt/bash-glob.svg?style=flat)](https://npmjs.org/package/bash-glob) [![Linux Build Status](https://img.shields.io/travis/micromatch/bash-glob.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/bash-glob)\n\n> Bash-powered globbing for node.js\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save bash-glob\n```\n\n**Install bash 4.3 or later**\n\nI recommend using [homebrew](https://github.com/Homebrew/homebrew-core) to install/upgrade bash:\n\n```sh\n$ brew upgrade bash\n```\n\n## Why?\n\nThe initial motivation was to use this for generating the `expected` values for comparisons in tests. But as it turns out, this is faster than node-glob in most cases I've tested.\n\nMoreover, this supports the majority of the feature-functionaly in node-glob, and it's more Bash-compliant since, well, it **is** Bash.\n\n**Edge cases**\n\nInevitably there will be edge cases. Thus far, however, I've found that many of the edge cases that seem to be problematic are already addressed or not problematic for Bash.\n\nPlease feel free to [create an issue](../../issues) if you find a bug or have a feature request.\n\n## Usage\n\n```js\nvar glob = require('bash-glob');\nglob(pattern[, options]);\n```\n\n## API\n\n### [glob](index.js#L30)\n\nAsynchronously returns an array of files that match the given pattern or patterns.\n\n**Params**\n\n* `patterns` **{String|Array}**: One or more glob patterns to use for matching.\n* `options` **{Object}**: Options to pass to bash. See available [options](#options).\n* `cb` **{Function}**: Callback function, with `err` and `files` array.\n\n**Example**\n\n```js\nvar glob = require('bash-glob');\nglob('*.js', function(err, files) {\n  if (err) return console.log(err);\n  console.log(files);\n});\n```\n\n### [.each](index.js#L98)\n\nAsynchronously glob an array of files that match any of the given `patterns`.\n\n**Params**\n\n* `patterns` **{String}**: One or more glob patterns to use for matching.\n* `options` **{Object}**: Options to pass to bash. See available [options](#options).\n* `cb` **{Function}**: Callback function, with `err` and `files` array.\n\n**Example**\n\n```js\nvar glob = require('bash-glob');\nglob.each(['*.js', '*.md'], {dot: true}, function(err, files) {\n  if (err) return console.log(err);\n  console.log(files);\n});\n```\n\n### [.sync](index.js#L154)\n\nReturns an array of files that match the given patterns or patterns.\n\n**Params**\n\n* `patterns` **{String}**: One or more glob patterns to use for matching.\n* `options` **{Object}**: Options to pass to bash. See available [options](#options).\n* `returns` **{Array}**: Returns an array of files.\n\n**Example**\n\n```js\nvar glob = require('bash-glob');\nconsole.log(glob.sync('*.js', {cwd: 'foo'}));\nconsole.log(glob.sync(['*.js'], {cwd: 'bar'}));\n```\n\n## Options\n\nThe following options may be used with the main `glob` function or any other method:\n\n* `dotglob`: (or `dot`, for [node-glob](https://github.com/Crafity/node-glob) compatibility) Includes filenames beginning with a `.` (dot) in the results of pathname expansion.\n* `extglob`: Enable extended [pattern matching](http://wiki.bash-hackers.org/syntax/pattern) features.\n* `failglob`: If set, patterns that fail to match filenames during pathname expansion result in an error message.\n* `globstar`: Enable recursive globbing with `**`.\n* `nocaseglob`: (or `nocase`, for [node-glob](https://github.com/Crafity/node-glob) compatibility) Enable case-insensitive matching in filenames when performing pathname expansion.\n* `nullglob`: If set, Bash allows patterns which match no files to expand to a null string, rather than themselves.\n\n## About\n\n<details>\n<summary><strong>Contributing</strong></summary>\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\nPlease read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards.\n\n</details>\n\n<details>\n<summary><strong>Running Tests</strong></summary>\n\nRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:\n\n```sh\n$ npm install && npm test\n```\n\n</details>\n\n<details>\n<summary><strong>Building docs</strong></summary>\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme && verb\n```\n\n</details>\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [bash-match](https://www.npmjs.com/package/bash-match): Match strings using bash. Does not work on windows, and does not read from the… [more](https://github.com/micromatch/bash-match) | [homepage](https://github.com/micromatch/bash-match \"Match strings using bash. Does not work on windows, and does not read from the file system. This library requires that Bash 4.3 or higher is installed and is mostly used for checking parity in unit tests.\")\n* [braces](https://www.npmjs.com/package/braces): Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support… [more](https://github.com/micromatch/braces) | [homepage](https://github.com/micromatch/braces \"Bash-like brace expansion, implemented in JavaScript. Safer than other brace expansion libs, with complete support for the Bash 4.3 braces specification, without sacrificing speed.\")\n* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/micromatch/micromatch \"Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.\")\n* [nanomatch](https://www.npmjs.com/package/nanomatch): Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash… [more](https://github.com/micromatch/nanomatch) | [homepage](https://github.com/micromatch/nanomatch \"Fast, minimal glob matcher for node.js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.3 wildcard support only (no support for exglobs, posix brackets or braces)\")\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 22, 2017._","_attachments":{},"homepage":"https://github.com/micromatch/bash-glob","bugs":{"url":"https://github.com/micromatch/bash-glob/issues"},"license":"MIT"}