public function addScript(string $script, $depends = null)
    {
        $script = $this->stripSuffix($script, ".min", ".js");
        $this->scripts[$script] = array("path" => $script, "depends" => $depends);
        return $this;
    }
public function addScript(string $script, $depends = null)
    {
        $script = $this->stripSuffix($script, ".min", ".js");
        $this->scripts[$script] = array("path" => $script, "depends" => $depends);
        return $this;
    }
public function addScript ( string $ script , $ depends = null ) { $ script = $ this -> stripSuffix ( $ script , ".min" , ".js" ) ; $ this -> scripts [ $ script ] = array ( "path" => $ script , "depends" => $ depends ) ; return $ this ; }
Add a javascript file to be loaded. This will strip the .min and .js suffixes
and add them to the stack of included scripts.
@param string $script The script to be loaded
@return AssetManager Provides fluent interface
Add a javascript file to be loaded . This will strip the . min and . js suffixes and add them to the stack of included scripts .