{"name":"glob-regex","version":"0.3.2","description":"Tiny glob->regex converter","repository":{"type":"git","url":"git+https://github.com/aleclarson/glob-regex.git"},"main":"index.js","devDependencies":{"testpass":"^0.5.1"},"keywords":["glob","globs","regex","regexp"],"gitHead":"66c73a1bca8f6d62b8f9782ca1c572dccb33124a","bugs":{"url":"https://github.com/aleclarson/glob-regex/issues"},"homepage":"https://github.com/aleclarson/glob-regex#readme","_id":"glob-regex@0.3.2","_npmVersion":"6.4.1","_nodeVersion":"11.1.0","_npmUser":{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"},"dist":{"integrity":"sha512-m5blUd3/OqDTWwzBBtWBPrGlAzatRywHameHeekAZyZrskYouOGdNB8T/q6JucucvJXtOuyHIn0/Yia7iDasDw==","shasum":"27348f2f60648ec32a4a53137090b9fb934f3425","tarball":"http://registry-npm.ywwl.com/glob-regex/download/glob-regex-0.3.2.tgz","fileCount":7,"unpackedSize":4105,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8zBRCRA9TVsSAnZWagAAaykQAJZ3KWAk0x871n4YTAjj\nq6jJaa/f2KUiBjkJb9/28IBeKgUMdxVyiuvEUT7nSZZptvJZyvFNzChtty1B\nAhK3QKoKfk7tsK26feVKaY+2LDOVW0qaTQZVKBdvKeXcYXbVAic+3xbkpC0o\nOQnNP+BobYmIKEU+2AQ409goTWZuHa0PoGJc4Mn2Qu7SuhPClx7+6sXpgVlR\n6RhnicErSZ502h0uXQUJKEj2nDo+Pdm0bfTkH84K1CcTqxqlDO8008iC29HW\nRyR9EQ2R7qaMOvaeKRqjZexv6wlqRpuXdMOQJGD50vz/yT9k2IMS8PpVe7wt\nI01ecxheEfomTS74jJJ8jzWKiXNaTqX7FCgLX3yl5SwbDe7Aq0/Yv5tgKGJZ\nEy6sd/bGwPJy6MCFdRKxIog1oApUvfL+sQQT80zGqb29NDvue0XUWwW9/uJD\nROym8wTEMY3nxhQC2wDynjz/Lz/CqlLfyFpPNrFjqYmTxurwh3+JeCRXOQsP\n1mMhOKj74aICfSvkvo7wm7Bes1hDerpY5O9KMQEf5q0b+Vzx1WUQHKjzH9J2\nkIjf7pPjIQqC/r7xeKTUTJCsADDwx0iaNDbaemyNeqRB98jAmrhB/UpxTmWa\nq+M7ROFvE29Neq7ZHTvKMyNfw3IR5OteeM0OisRPgeWGisArQqlxFgoITCGt\nqYqE\r\n=JT8S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4UnHS37BgyHz5FXNVuoZjp09ZJW9msfCotrU7xz0jFQIhAOC4qh3Sf+MChZkjOCwRajVTiKXZLPmR4UBsCDC0pMhQ"}],"size":2271,"noattachment":false,"key":"/glob-regex/-/glob-regex-0.3.2.tgz"},"maintainers":[{"name":"aleclarson","email":"alec.stanford.larson@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/glob-regex_0.3.2_1542664272215_0.5817337026512501"},"_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":1542664272349,"_cnpm_publish_time":1542664272349,"dist-tags":{"latest":"0.3.2"}}