{"name":"requires-regex","description":"Regular expression for matching javascript require statements.","version":"1.0.4","homepage":"https://github.com/jonschlinkert/requires-regex","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/requires-regex.git"},"bugs":{"url":"https://github.com/jonschlinkert/requires-regex/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"devDependencies":{"gulp-format-md":"^1.0.0","mocha":"^3.5.3"},"keywords":["dependencies","dependency","devDependencies","devDependency","exec","expression","expressions","find","match","matcher","matches","matching","module","modules","re","regex","regexp","regular","require","requires","statement","test"],"verb":{"toc":false,"layout":"default","tasks":["readme"],"plugins":["gulp-format-md"],"related":{"list":["lint-deps","match-requires","regex-cache"]},"lint":{"reflinks":true}},"gitHead":"9288a933d936b5cb20b112b847b5c8343abfc23e","_id":"requires-regex@1.0.4","_npmVersion":"5.8.0","_nodeVersion":"9.9.0","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"dist":{"integrity":"sha512-lOb6lagY+1XHHCk6PEOj1/mLsl95p5vJmTWf+u2Qn3fn6jK1EDkBLK8LeL63JU3eYqfvQyUHtEmBZq3UZ1T9Ww==","shasum":"31b516068dfe68307865a6ea8c34281147bc44a8","tarball":"http://registry-npm.ywwl.com/requires-regex/download/requires-regex-1.0.4.tgz","fileCount":4,"unpackedSize":7765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa05KjCRA9TVsSAnZWagAAldEP/joSqGtVTbpOh67echRM\nfFWTepEyGJf257hfrX5Orlm02zC4TGcoQUsRopgFVSBbgnkmI8HmAzsOvJnL\nFUr4kWjdgbAb8UvYmddExd4A8EH/jtHGt+DJSqFNsY8FAsmDYhbnfmLgGUG+\nAEelpqyMsvQN4D4rPV2rL4NVoAJg9+wQsL3elwgGCtbE+lwMtQG01HR7TsQt\nCYTQ0QEiY6hanmHzkF5PdFjRfAC6FiMMAtisA/xuAaYUBIouUnAWu7t00hZn\nqcFeEZjxOrMy8H91G1WBsPy4Jjj9+9JkmzwCvFr2+Yc/PMu+R/y3R7f8h5Fy\nzDsq6l8QYMPagMY1XWknVVVRThYtXaGK/pCoKFY7+UqNyTZgFDlfIb5jTIku\nJNTtwrkyEbNwReR3w4JHVS5k/XxdS5Bd2piJXnNk2R6llR86lR4fpTJJIJvr\nk3gFTX/+MjcegYXE5J1OrDOegn5sT/eWhXUtX0ryuDmqJJmgEklLUs73F53f\ndu4Kb+VoW9AGefO5vmUCEzrhd9hJ5cgzGg9KovCAgyyLpWVD5s/Gdmbrym7v\nv6IJLR0uMKFsqn151MwyYA5gKWqq4NDRq+bx2TWXMT/JWTzuRphs2Wmjz8nK\n+jbRjX1r/4jFWYiRWxuDue7j4qiOP1lLmF16tyrj7YjdVNxZpUxKv6fgbTIV\nKVkb\r\n=pQ0T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDA5wVpgwIQza3GvPc9zqxcbrwmfI4H8K6ybU7Qx6SzDgIhAKFgl+8XCYNBLmtoLy2+M/8FOXvUy2dyvaQ3N2Eixw/O"}],"size":3213,"noattachment":false,"key":"/requires-regex/-/requires-regex-1.0.4.tgz"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/requires-regex_1.0.4_1523815074510_0.4910538617627396"},"_hasShrinkwrap":false,"readme":"# requires-regex [![NPM version](https://img.shields.io/npm/v/requires-regex.svg?style=flat)](https://www.npmjs.com/package/requires-regex) [![NPM monthly downloads](https://img.shields.io/npm/dm/requires-regex.svg?style=flat)](https://npmjs.org/package/requires-regex) [![NPM total downloads](https://img.shields.io/npm/dt/requires-regex.svg?style=flat)](https://npmjs.org/package/requires-regex) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/requires-regex.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/requires-regex)\n\n> Regular expression for matching javascript require statements.\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 requires-regex\n```\n\n## Usage\n\nTHe main export is a function that must be called. This ensures that a new regex is returned each time the function is called.\n\n```js\nconst regex = require('requires-regex')();\nconst match = regex.exec('const foo = require(\\'@bar/baz\\');');\n\nconsole.log(match);\n// [ 'const foo = require(\\'@bar/baz\\');',\n//   undefined,\n//   'foo',\n//   '\\'',\n//   '@bar/baz',\n//   'bar',\n//   'baz',\n//   index: 0,\n//   input: 'const foo = require(\\'@bar/baz\\');' ]\n```\n\n**Match results**\n\n* `0` - the full match\n* `1` - require statements inside quoted strings, otherwise undefined.\n* `2` - variable name before `require()`, if defined, otherwise undefined\n* `3` - leading quote inside `require()`, this is used as a reference to match ends on a trailing quote of the same type\n* `4` - the full name inside the `require()` statement. For example, in `require(\"@foo/bar\")`, the full name is `@foo/bar`.\n* `5` - the first segment of a scoped name. For example, `foo` in `@foo/bar`. Otherwise undefined.\n* `6` - the second segment of a scoped name. For example, `bar` in `@foo/bar`. Otherwise undefined.\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\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* [lint-deps](https://www.npmjs.com/package/lint-deps): CLI tool that tells you when dependencies are missing from package.json and offers you a… [more](https://github.com/jonschlinkert/lint-deps) | [homepage](https://github.com/jonschlinkert/lint-deps \"CLI tool that tells you when dependencies are missing from package.json and offers you a choice to install them. Also tells you when dependencies are listed in package.json but are not being used anywhere in your project. Node.js command line tool and API\")\n* [match-requires](https://www.npmjs.com/package/match-requires): Match require statements in a string. Returns an array of matching require statements. Each match… [more](https://github.com/jonschlinkert/match-requires) | [homepage](https://github.com/jonschlinkert/match-requires \"Match require statements in a string. Returns an array of matching require statements. Each match is an object with line number, variable name, and module name. Statements in code comments are ignored.\")\n* [regex-cache](https://www.npmjs.com/package/regex-cache): Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of… [more](https://github.com/jonschlinkert/regex-cache) | [homepage](https://github.com/jonschlinkert/regex-cache \"Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in surprising performance improvements.\")\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 22 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 1 | [alvinsight](https://github.com/alvinsight) |\n\n### Author\n\n**Jon Schlinkert**\n\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2018, [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 April 15, 2018._","publish_time":1523815074618,"_cnpm_publish_time":1523815074618,"dist-tags":{"latest":"1.0.4"}}