stripcomments

MIT License

Stars
19

Simple JS parser to strip comments

Usage is simple - create an instance and call .strip(string) to get back the de-commented string...

It's intended to be 100% effective - catching any valid comment, including:

etc.

I've tested it a bit against use-cases I could think of, and tried it against a few common libraries (e.g., the dev version of jQuery), and it seems fine, but I'd be interested to hear if anyone breaks it.