https://github.com/diversen/remove-comments-regex
Remove comments from a string using javascript using a regex
https://github.com/diversen/remove-comments-regex
Last synced: over 1 year ago
JSON representation
Remove comments from a string using javascript using a regex
- Host: GitHub
- URL: https://github.com/diversen/remove-comments-regex
- Owner: diversen
- Created: 2017-12-30T10:51:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-30T10:55:42.000Z (over 8 years ago)
- Last Synced: 2025-03-09T16:37:46.393Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# remove-comments
Remove comments from a string using a regex
This means comments are removed in a primitive way
## Install
npm install --save remove-comments-regex
## Usage
var removeComments = require('remove-comments-regex')
var noComments = removeComments(someStr)
## Usage CLI
npm install -g remove-comments-regex
remove-comments-regex test.txt > test-no-comments.txt
## See
Uses this regex: https://stackoverflow.com/a/15123777/464549
## License
MIT © [Dennis Iversen](https://github.com/diversen)