{"name":"glob-regex","version":"0.2.2","repository":{"type":"git","url":"git+https://github.com/aleclarson/glob-regex.git"},"devDependencies":{"testpass":"^0.5.1"},"gitHead":"396495d7bd215ad322099e57ab2f9e53374bdb87","description":"Convert a glob to a `RegExp` object.","bugs":{"url":"https://github.com/aleclarson/glob-regex/issues"},"homepage":"https://github.com/aleclarson/glob-regex#readme","_id":"glob-regex@0.2.2","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"},"maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"dist":{"integrity":"sha512-3dzg5vt7G9beHqsqpJpMvdMZ+BRNPc9zC312pg3ew3PwtFq4jDeLu7QnJOCoQ3lbrkKAxpRkKDvSi1A9RxgzwA==","shasum":"43dc4b0d986a394c7770a99802367d8300370977","tarball":"http://registry-npm.ywwl.com/glob-regex/download/glob-regex-0.2.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOlkI17tysLQ+oiDjOPqYWjoGoOtrGAZi3WXX00PgVvgIhAOFmXkz9mjZkOj3euuNJO6XdaTNJnbdvJGiywbiBYWvt"}],"size":2580,"noattachment":false,"key":"/glob-regex/-/glob-regex-0.2.2.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/glob-regex-0.2.2.tgz_1514669427840_0.16452122735790908"},"directories":{},"readme":"# glob-regex\n\n[![npm](https://img.shields.io/npm/v/glob-regex.svg)](https://www.npmjs.com/package/glob-regex)\n[![Bundle size](https://badgen.net/bundlephobia/min/glob-regex)](https://bundlephobia.com/result?p=glob-regex)\n[![Install size](https://packagephobia.now.sh/badge?p=glob-regex)](https://packagephobia.now.sh/result?p=glob-regex)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/alecdotbiz)\n\nConvert a glob to a `RegExp` object.\n\n- Any periods are escaped (`.` -> `\\\\.`)\n- `*` and `**` are replaced\n- Always start with `^` and end with `$`\n- All `RegExp` syntax is valid\n- Path separators are auto-escaped by `new RegExp`\n\n```js\nconst globRegex = require('glob-regex')\n\n// Match no directory.\nlet re = globRegex('*.js')\nre.test('a.js') // => true\nre.test('a.css') // => false\nre.test('a/b.js') // => false\n\n// Use ? operator for optional character.\nre = globRegex('*.jsx?')\nre.test('a.js') // => true\nre.test('b.jsx') // => true\n\n// Match any directory.\nre = globRegex('**.css')\nre.test('a.css') // => true\nre.test('a/b.css') // => true\n\n// Match any directory and specific name.\nre = globRegex('**/a.css')\nre.test('a.css') // => true\nre.test('b/a.css') // => true\n\n// Use | operator to match multiple values.\nre = globRegex('*.(js|css)')\nre.test('a.js') // => true\nre.test('a.css') // => true\n```\n\nUse `globRegex.replace()` to transform a glob into a RegExp-compatible string.\n\n**NOTE:** It's not recommended to use `globRegex(array)` if you need\nthe `exec` method, since the result will be difficult to make use of.\nUsing the `test` method works great, though!\n\n","publish_time":1514669428794,"_cnpm_publish_time":1514669428794,"dist-tags":{"latest":"0.3.2"}}