Node

Documentation

universions.node.get_node_version(node_path: Union[pathlib.Path, str, None] = None) → Optional[universions.version.Version]

Get the Node version.

Parameters:node_path – The path to the node to check. If not defined, it uses “node”
Returns:The Node version.

Python example

>>> from universions.node import get_node_version
>>> get_node_version()
Version(major=12, minor=6, patch=0, prerelease=None, build=None)

CLI example

>>> universions node
12.6