{"_id":"regex-flags","_rev":"47937","name":"regex-flags","description":"Does one simple thing - gets the flags from a regular expression. Useful for cloning and any library that uses or generates regular expressions that are created from other regular expressions.","dist-tags":{"latest":"0.1.0"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"time":{"modified":"2021-06-03T10:14:44.000Z","created":"2015-08-05T14:45:18.874Z","0.1.0":"2015-08-05T14:45:18.874Z"},"users":{},"author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/regex-flags.git"},"versions":{"0.1.0":{"name":"regex-flags","description":"Does one simple thing - gets the flags from a regular expression. Useful for cloning and any library that uses or generates regular expressions that are created from other regular expressions.","version":"0.1.0","homepage":"https://github.com/jonschlinkert/regex-flags","author":{"name":"Jon Schlinkert","url":"https://github.com/jonschlinkert"},"repository":{"type":"git","url":"git+https://github.com/jonschlinkert/regex-flags.git"},"bugs":{"url":"https://github.com/jonschlinkert/regex-flags/issues"},"license":"MIT","files":["index.js"],"main":"index.js","engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"dependencies":{"kind-of":"^2.0.0"},"devDependencies":{"mocha":"*","should":"*"},"keywords":["expression","flag","flags","get","keys","regex","regexp","regular","regular-expression"],"verb":{"related":{"list":["is-glob","regex-cache","is-equal-regex"]}},"gitHead":"a0862bf23d41fc26c3c397d2c6c9fa7f84eabd71","_id":"regex-flags@0.1.0","_shasum":"3442798428faaed53b0cfede7f57044110ed1e94","_from":".","_npmVersion":"2.10.1","_nodeVersion":"0.12.4","_npmUser":{"name":"jonschlinkert","email":"github@sellside.com"},"maintainers":[{"name":"jonschlinkert","email":"github@sellside.com"}],"dist":{"shasum":"3442798428faaed53b0cfede7f57044110ed1e94","size":2303,"noattachment":false,"key":"/regex-flags/-/regex-flags-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/regex-flags/download/regex-flags-0.1.0.tgz"},"directories":{},"publish_time":1438785918874,"_cnpm_publish_time":1438785918874,"_hasShrinkwrap":false}},"readme":"# regex-flags [![NPM version](https://badge.fury.io/js/regex-flags.svg)](http://badge.fury.io/js/regex-flags)\n\n> Does one simple thing - gets the flags from a regular expression. Useful for cloning and any library that uses or generates regular expressions that are created from other regular expressions.\n\nIf you need a \"ES6 spec-compliant `RegExp.prototype.flags` shim, take a look at the [RegExp.prototype.flags](https://github.com/es-shims/RegExp.prototype.flags) lib, from @ljharb.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/)\n\n```sh\n$ npm i regex-flags --save\n```\n\n## Usage\n\n```js\nvar regexFlags = require('regex-flags');\n\nregexFlags(/foo/);\n//=> ''\n\nregexFlags(/foo/g);\n//=> 'g'\n\nregexFlags(/foo/m);\n//=> 'm'\n\nregexFlags(/foo/i);\n//=> 'i'\n\nregexFlags(/foo/gm);\n//=> 'gm'\n\nregexFlags(/foo/gi);\n//=> 'gi'\n\nregexFlags(/foo/img);\n//=> 'gim'\n\nregexFlags(/foo/gim);\n//=> 'gim'\n\nregexFlags(/foo/gim);\n//=> 'gim'\n```\n\n## Related projects\n\n* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern.\n* [is-equal-regex](https://github.com/jonschlinkert/is-equal-regex): Returns true if regular expression A is equal to regex B. Compares the expression and… [more](https://github.com/jonschlinkert/is-equal-regex)\n* [regex-cache](https://github.com/jonschlinkert/regex-cache): Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of… [more](https://github.com/jonschlinkert/regex-cache)\n\n## Running tests\n\nInstall dev dependencies:\n\n```sh\n$ npm i -d && npm test\n```\n\n## Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/regex-flags/issues/new)\n\n## Author\n\n**Jon Schlinkert**\n\n+ [github/jonschlinkert](https://github.com/jonschlinkert)\n+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)\n\n## License\n\nCopyright © 2015 Jon Schlinkert\nReleased under the MIT license.\n\n***\n\n_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on August 05, 2015._","_attachments":{},"homepage":"https://github.com/jonschlinkert/regex-flags","bugs":{"url":"https://github.com/jonschlinkert/regex-flags/issues"},"license":"MIT"}