MCPcopy Index your code
hub / github.com/nodejs/node / get_major_minor_patch

Function get_major_minor_patch

tools/getnodeversion.py:5–13  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

3
4
5def get_major_minor_patch(text):
6 for line in text.splitlines():
7 if line.startswith('#define NODE_MAJOR_VERSION'):
8 major = line.split()[2]
9 elif line.startswith('#define NODE_MINOR_VERSION'):
10 minor = line.split()[2]
11 elif line.startswith('#define NODE_PATCH_VERSION'):
12 patch = line.split()[2]
13 return major, minor, patch
14
15
16node_version_h = os.path.join(os.path.dirname(__file__),

Callers 1

getnodeversion.pyFile · 0.85

Calls 2

splitlinesMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…