Node version in ZSH

Add to your .zshrc

function node_prompt_version {
  if ls | grep package.json &> /dev/null; then
    if which node &> /dev/null; then
      echo "%{$fg_bold[blue]%}node:(%{$fg[red]%}$(node -v)%{$fg[blue]%})"
    fi
  fi
}

PROMPT+='$(node_prompt_version) '