-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathgetos.node.txt
19 lines (15 loc) · 1.01 KB
/
getos.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
┏━━━━━━━━━━━┓
┃ GETOS ┃
┗━━━━━━━━━━━┛
VERSION ==> #3.2.1
GETOS(FUNC(ERROR, OBJ)) #Returns OBJ:
# - os STR: OS.platform()
# (only if Linux)
# - dist STR:
# - Linux distribution
# - do it by finding and reading file like `/etc/lsb-release`
# - release STR|undefined (e.g. '19.10')
# - codename STR|undefined (e.g. 'eoan')
PWD/logic/DIST.js #If present, will be loaded to modify OBJ according to DIST
#Should export FUNC(OBJ, STR, FUNC2(ERROR, OBJ))
# - STR is content of file like `/etc/lsb-release`