{"name":"comment-regex","version":"1.0.1","description":"Regular expression for matching JavaScript comments","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/comment-regex.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"ava"},"files":["index.js"],"keywords":["text","string","regex","regexp","re","match","test","find","pattern","comment","comments","js","javascript","line","block"],"devDependencies":{"ava":"*"},"gitHead":"7cfc559dc6954b7d75dea7d2a2c434da12f49f7d","bugs":{"url":"https://github.com/sindresorhus/comment-regex/issues"},"homepage":"https://github.com/sindresorhus/comment-regex#readme","_id":"comment-regex@1.0.1","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"integrity":"sha512-IWlN//Yfby92tOIje7J18HkNmWRR7JESA/BK8W7wqY/akITpU5B0JQWnbTjCfdChSrDNb0DrdA9jfAxiiBXyiQ==","shasum":"e070d2c4db33231955d0979d27c918fcb6f93565","tarball":"http://registry-npm.ywwl.com/comment-regex/download/comment-regex-1.0.1.tgz","fileCount":4,"unpackedSize":3221,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAMmCftVZLFwkYpkHFb76NuGDt4Bjtxcsbd+W9vnjJ/AAiEA3CX0un+CBbSDExe9JZhzGp1xjtO0LwWHnOpS8Jk6x74="}],"size":1733,"noattachment":false,"key":"/comment-regex/-/comment-regex-1.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/comment-regex_1.0.1_1521794507279_0.8705761873687534"},"_hasShrinkwrap":false,"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":1521794507321,"_cnpm_publish_time":1521794507321,"dist-tags":{"latest":"2.0.0"}}