I'm trying to find a JS library, for coverting .ini file to .json file
I need that all oparations will be in client-side(!!!), so https://www.npmjs.org/package/clonkrefiniparser is not helping me.
For example:
.ini file:
[Master_Settings:1]
Model Name=RC-74DL
IP Address=192.168.1.39
Port=50000
[Device_Ports:1]
[Slave_Settings:2]
ConfigurationfilePath=C:\Users\name\Documents\K-Cssig2\Devices\RC-63D.xml
Button Label1=
[Device_Ports:2]
ADIO Mode 1 = DI
ADIO Mode 2 = DI
[Slave_Settings:11]
Model Name = Test 3
Desription=
ConfigurationfilePath=Devices\Test 3.xml
Button Label1=
Button Label2=
[Device_Ports:11]
ADIO Mode 1 = DI
ADIO Mode 2 = DI
[Serial:1:6]
Main Display=True
Default Port Description=MX660
User Port Description=MX660
Driver Name=BenQ MX660 A
Device_On_Command=N/A
Device_Off_Command=N/A
IsPowerQuery=False
IsLampQuery=False
To .json format
Any ideas?
This indeed is just string manipulation and you don't really need a library for it.
Here's a suggestion (ES6 snippet, the inifile is within a hidden div in html):
See it in action in this jsFiddle