A library to strip comments from javascript code?

I’m looking for a library in PHP that will just remove comments from javascript code. I’ve found some regexes on stackoverflow but I’d prefer to find something well tested. I do not want a full-blown minifier (I’ve found a few of them already) - I just want the comments removed with all the whitespace, newlines, variable names, etc. intact. Do you know something like this to recommend?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.