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

hasNode() protected method

Does user have Node.js installed?
protected hasNode ( ) : boolean
return boolean
    protected function hasNode()
    {
        if ($this->useWindows()) {
            $node = shell_exec('where node');
        } else {
            $node = shell_exec('which node');
        }
        return str_contains($node, 'node');
    }