debugMode ? $this->js : (new Minify\JS($this->js))->minify(); } /** * Append JS. * * @param string $js * @param string $section The section name. Shows when in debug mode * * @return $this */ public function appendJs($js, $section = '') { if ($section && $this->debugMode) { $slashes = str_repeat('/', strlen($section) + 10); $this->js .= <<js .= $js; if ($section && $this->debugMode) { $this->js .= <<