1.0.6 • Published 1 year ago

iniconvertjson v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

IniConvertJSON

IniConvertJSON is a basic NodeJS Package that lets you convert raw ini files to JSON! INIConvertJSON is created by Kohl#9999

Examples

Get INI from Web:

const convert = require('iniconvertjson');

convert.readINIFileFromWeb("https://launchercdn.nekuzi.cf/ini/test.ini")
    .then(data => console.log(data))
    .catch(error => console.error(error));

Get Local INI:

const convert = require('iniconvertjson');

convert.readINIFile("test.ini")
    .then(data => console.log(data))
    .catch(error => console.error(error));

Convert JSON -> INI:

console.log(convert.stringifyINI(JSON));

Write JSON -> INI:

convert.readINIFile("test.ini")
    .then(data => {
        convert.writeINIFile("exported.ini", data);
    })
.catch(error => console.error(error));

Example JSON after conversion:

{
  user: { name: 'John Doe', email: 'johndoe@example.com' },
  settings: { theme: 'dark', language: 'en' }
}
1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago