Class JavaScriptStripper


  • public class JavaScriptStripper
    extends java.lang.Object
    Strips comments and whitespace from javascript
    Author:
    Matej Knopp
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String stripCommentsAndWhitespace​(java.lang.String original)
      Removes javascript comments and whitespace from specified string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaScriptStripper

        public JavaScriptStripper()
    • Method Detail

      • stripCommentsAndWhitespace

        public java.lang.String stripCommentsAndWhitespace​(java.lang.String original)
        Removes javascript comments and whitespace from specified string.
        Parameters:
        original - Source string
        Returns:
        String with removed comments and whitespace