def jsmin(js):
 if (not is_3):
  if (cStringIO and (not isinstance(js, unicode))):
   klass = cStringIO.StringIO
  else:
   klass = StringIO.StringIO
 else:
  klass = io.StringIO
 ins = klass(js)
 outs = klass()
 JavascriptMinify(ins, outs).minify()
 return outs.getvalue()

def jsmin ( js ) : if ( not is_3 ) : if ( cStringIO and ( not isinstance ( js , unicode ) ) ) : klass = cStringIO . StringIO else : klass = StringIO . StringIO else : klass = io . StringIO ins = klass ( js ) outs = klass ( ) JavascriptMinify ( ins , outs ) . minify ( ) return outs . getvalue ( )
returns a minified version of the javascript string .