{"name":"comment-regex","version":"1.0.0","description":"Regular expression for matching JavaScript comments","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/comment-regex"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"node test.js"},"files":["index.js"],"keywords":["text","string","regex","regexp","re","match","test","find","pattern","comment","comments","js","javascript","line","block"],"devDependencies":{"ava":"0.0.4"},"gitHead":"a3d4222bef18d8b09993542738a28d7916d60405","bugs":{"url":"https://github.com/sindresorhus/comment-regex/issues"},"homepage":"https://github.com/sindresorhus/comment-regex","_id":"comment-regex@1.0.0","_shasum":"7dd70268c83648a9c4cc19bf472d52e64f63918d","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"dist":{"shasum":"7dd70268c83648a9c4cc19bf472d52e64f63918d","tarball":"http://registry-npm.ywwl.com/comment-regex/download/comment-regex-1.0.0.tgz","integrity":"sha512-V/DzIoUH777cJPj4Tnks+he7X43nCZLV45orVQsVGPV1y/TazWu2XHKB0fWXZGCwYNxBgxlxZj6m13NyuQOW4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7T/b0Pdzy0eqAXm5vqdl38KWScmerX3eGcFzQBnb8IwIhAKSY9iJ4Uoi8bXXxRPPT3cr7XC3eilm4o2dcFIBBD9nF"}],"size":1066,"noattachment":false,"key":"/comment-regex/-/comment-regex-1.0.0.tgz"},"directories":{},"readme":"# comment-regex\n\n> Regular expression for matching JavaScript comments\n\n*This is pretty fragile and created for performance reasons where using a real parser would be overkill. Do not use it with untrusted user input.*\n\n## Install\n\n```sh\nnpm install comment-regex\n```\n\n## Usage\n\n```js\nimport {commentRegex} from 'comment-regex';\n\n// Contains a comment\ncommentRegex().test('/* unicorn */\\nvar foo = true;');\n//=> true\n\n// Get the contents of a comment\ncommentRegex().exec('/* unicorn */\\nvar foo = true;')[2].trim();\n\n// Get all the comments\n'/* unicorn */\\nvar foo = true;\\nvar unicorn = \"rainbows\"; // rainbow'.match(commentRegex());\n//=> ['/* unicorn */', ' // rainbow']\n```\n\n## API\n\nThe contents of the comment is in the first submatch.\n\n### commentRegex()\n\nReturns a regex for matching line and block comments.\n\n### lineCommentRegex()\n\nReturns a regex for matching line comments.\n\n### blockCommentRegex()\n\nReturns a regex for matching block comments.\n","publish_time":1410607682057,"_cnpm_publish_time":1410607682057,"dist-tags":{"latest":"2.0.0"}}