public function javascriptMinify($file, $type = 'file')
    {
        $file = $this->getFile($file, $type);
        $file = preg_replace(["/\/\/(.*\s+)/", "/;+\}/"], ['', '}'], $file);
        $file = $this->cleanSpaces($file);
        $file = $this->removeComments($file);

        return $file;
    }
public function javascriptMinify($file, $type = 'file')
    {
        $file = $this->getFile($file, $type);
        $file = preg_replace(["/\/\/(.*\s+)/", "/;+\}/"], ['', '}'], $file);
        $file = $this->cleanSpaces($file);
        $file = $this->removeComments($file);

        return $file;
    }
public function javascriptMinify ( $ file , $ type = 'file' ) { $ file = $ this -> getFile ( $ file , $ type ) ; $ file = preg_replace ( [ "/\/\/(.*\s+)/" , "/;+\}/" ] , [ '' , '}' ] , $ file ) ; $ file = $ this -> cleanSpaces ( $ file ) ; $ file = $ this -> removeComments ( $ file ) ; return $ file ; }
Minify Js.

@param (mixed) $file valid code.

@since 2.0.3

@return mixed
Minify Js .