{"name":"glob-regex","version":"0.3.1","repository":{"type":"git","url":"git+https://github.com/aleclarson/glob-regex.git"},"devDependencies":{"testpass":"^0.5.1"},"gitHead":"78cfeac5ddd62035ef4a4f1ae355b49860eb06e0","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.3.1","_npmVersion":"6.4.1","_nodeVersion":"11.1.0","_npmUser":{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"},"dist":{"integrity":"sha512-UprxG20M37b0ytkm4aZqnEWiN49u2kuEEtep3fGHwy393WQdLDKIrOFyx5J0GVsHJVEma+CQUv54iR46YPDMEw==","shasum":"1923303486997a22bbc1353be1145d3db8cec6b6","tarball":"http://registry-npm.ywwl.com/glob-regex/download/glob-regex-0.3.1.tgz","fileCount":7,"unpackedSize":3512,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb61CSCRA9TVsSAnZWagAAKUoQAJ/V/i/S0jXpKSkL8kaU\n7aCNWqTdqEJO9WyzzwuSroDrGakByg/jZ5VWfWFzKWnJ8V8VU24Odi5fS6qa\nl1kjgvsbkIvl0ulyndNsC2k+7QkvZhmu9y3dmgxw02dIEWQQTB7I9ZXb/DMG\nTimBIdY87gmwzZyWf1+rln+nLeU+MpilHazZc3laE8D5MfRADnYzX+WtH+nN\nf/BoFnbzP5LZofsSKmUzx5H8rmQH8kJpCWCL27ffBtw1R+eyztlhXMyekCPy\nnlVT6k1IxakjIHOGyZ7tRJKfznBecq+ojBm5pCfcDY2xfOeKhJhVn8TXLotl\nodlc/uSBrEIY8SFx4vydOQymcPZHXw9+x6QwJjZ+oaTHK20iQIuOFC2i76Hd\nXpBeJT/zdnXTxrBPeyvftg6uQvClKbCyxzJljfcDh3BasigIEMiwdwkrOPUY\nzHvYpApdBwqDnMC9Y06glK2R20lkLyXkycNR+tsEm+x8/xJUxgKHJX2Mbal2\nWI8/y2TwG/LAYa0yXPxJ6sI//PG+18u3q3pyl4+UR/4mhMxIAAiyDBDG+45M\n29hzHFznIAzgMU7K0LWPDX/umapXD8n3R4qAW9WTYgg3N9SmqvPYalEiMs/l\n1T//9mkjZQDTciyi/RXyFPAfK84TUU5dLKnwhS/ZW/C7YydnHXEmVYUjxWQs\nXF7K\r\n=71V2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADbgdmqkW689GpXL3eDp2H+mM4N5Nd5nDEfYG906rvlAiAjFMi8WalGICCVQHYjR7JTY9LHphxwZcViqlguOGyHBw=="}],"size":2044,"noattachment":false,"key":"/glob-regex/-/glob-regex-0.3.1.tgz"},"maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/glob-regex_0.3.1_1542148242011_0.902038804507395"},"_hasShrinkwrap":false,"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":1542148242150,"_cnpm_publish_time":1542148242150,"dist-tags":{"latest":"0.3.2"}}