Efficiently\Larasset\Commands\BaseCommand::hasNpm PHP Method

hasNpm() protected method

Does user have Npm installed?
protected hasNpm ( ) : boolean
return boolean
    protected function hasNpm()
    {
        if ($this->useWindows()) {
            $npm = shell_exec('where npm');
        } else {
            $npm = shell_exec('which npm');
        }
        return str_contains($npm, 'npm');
    }