public function javascript($name, Closure $callback = null)
    {
        return $this->add($name, function($asset) use ($callback)
        {
            $asset->setGroup('javascripts');

            is_callable($callback) and call_user_func($callback, $asset);
        });
    }
public function javascript($name, Closure $callback = null)
    {
        return $this->add($name, function($asset) use ($callback)
        {
            $asset->setGroup('javascripts');

            is_callable($callback) and call_user_func($callback, $asset);
        });
    }
public function javascript ( $ name , Closure $ callback = null ) { return $ this -> add ( $ name , function ( $ asset ) use ( $ callback ) { $ asset -> setGroup ( 'javascripts' ) ; is_callable ( $ callback ) and call_user_func ( $ callback , $ asset ) ; } ) ; }
Find and add a javascript asset to the directory.

@param  string  $name
@param  \Closure  $callback
@return \Basset\Asset
Find and add a javascript asset to the directory .