Just rolled out YINI v1.0.2-beta, and this one focuses on making the parser more capable and rock-solid when it comes to handling numbers.
π§ What's New
The internal YINI Parser has been upgraded to v1.0.2-beta, bringing full support for:
- Negative values
-
Edge cases across all number types:
- Integers - Floats - Hexadecimal - Binary - Octal - Duodecimal (base-12) - Exponential notation
π‘ Why It Matters
If you're working with configs that push the limitsβmaybe big integer IDs, scientific values, or alternative base notationsβthis update ensures they'll parse correctly, consistently, and without surprises.
Usage
Installation
-
Install it globally from npm
Open your terminal and run:
npm install -g yini-cli -
Test functionality
Create a simple test file, for example:config.yini:
^ App name = 'My App Title' version = '1.2.3' pageSize = 25 darkTheme = offThen run:
yini parse config.yiniExpected result, your CLI should output a parsed version of the config and output something similar to:
{ App: { name: 'My App Title', version: '1.2.3', pageSize: 25, darkTheme: false } }
All Supported Number Format
In YINI config format below:
@yini
^ App
name = 'My App Title'
version = "1.2.3"
pageSize = 25
darkTheme = off
^ NumberFormats
^^ HexFormat // Hexadecimal (base-16)
hex = #FF0066 // Default notation
altHex = 0xFF0066 // Alternative notation
^^ BinFormat // Binary (base-2)
bin = %10101111 // Default notation
altBin = 0b10101111 // Alternative notation
^^ OctFormat // Octal (base-8)
oct = 0o755 // (decimal 493)
^^ DozFormat // Duodecimal (base-12)
doz = 0z10XE // Default notation: X=10, E=11
altDoz = 0z10AB // Alternative notation: A=10, B=11
Will produce following JS object:
{
App: {
name: 'My App Title',
version: '1.2.3',
pageSize: 25,
darkTheme: false
},
NumberFormats: {
HexFormat: {
hex: 16711782,
altHex: 16711782
},
BinFormat: {
bin: 175,
altBin: 175
},
OctFormat: {
oct: 493
},
DozFormat: {
doz: 1859,
altDoz: 1859
}
}
}
Links
- yini-cli on GitHub
- YINI Homepage
- YINI Project YINI home.
Top comments (0)