-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathini_node.node.txt
40 lines (35 loc) · 2.17 KB
/
ini_node.node.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
┏━━━━━━━━━┓
┃ INI ┃
┗━━━━━━━━━┛
VERSION ==> #5.0.0
#INI file parser|serializer
#Supports:
# - UTF-8
# - #COMMENT
# - can escape ; or # with backslash
# - comment at end of line (but keeps trailing whitespaces)
# - optional VAR, VAR2=VAL, VAL
# - nested VARR:
# - parents do not need to be created
# - can escape dot with backslash
# - quoting VAR|VAR2|VAL with '
# - quoting VAR|VAR2|VAL with ", and using backslash sequences
# - indentation ignored
# - VAL types:
# - STR|BOOL|null
# - ARR using VAR2[]=VAL
# - not NUM
# - any JSON type if quoted with '
#Does not support:
# - case-insensitive
INI.parse('INI')->OBJ #
INI.stringify(OBJ[, OPTS])->'INI' #
OPTS.section #VAR. Prepends "VAR." to all sections, including root
OPTS.whitespace #BOOL (def: false). Put space around =
OPTS.align #BOOL (def: false). Put space around = to align them
OPTS.sort #BOOL (def: false). Sort OBJ keys
OPTS.platform #'win32|unix' (def: current). \n vs \r\n
OPTS.newline #BOOL (def: false). Add an empty line after each section
OPTS.bracketedArray #BOOL (def: false). Treat duplicate VAR as ARRs
INI.[un]safe(STR[, OPTS])->STR #Escapes double quotes
OPTS.bracketedArray #