MCPcopy Index your code
hub / github.com/ekalinin/nodeenv / parse_version

Function parse_version

nodeenv.py:174–182  ·  view source on GitHub ↗

Parse version string to a tuple of integer parts

(version_str)

Source from the content-addressed store, hash-verified

172
173
174def parse_version(version_str):
175 """
176 Parse version string to a tuple of integer parts
177 """
178 v = version_str.replace('v', '').split('.')[:3]
179 # remove all after '+' in the PATCH part of the version
180 if len(v) >= 3:
181 v[2] = v[2].split('+')[0]
182 return tuple(map(int, v))
183
184
185def node_version_from_args(args):

Callers 2

node_version_from_argsFunction · 0.85
get_root_urlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected