lol-ini-parser

0.9.1 • Public • Published

lol-ini-parser

A parser for .ini files from League of Legends.

Download

lol-ini-parser is installable via:

  • GitHub git clone https://github.com/Pupix/lol-ini-parser.git
  • npm: npm install lol-ini-parser

Usage example

var IniParser = require('lol-ini-parser'),
    ini = new IniParser();

    ini.read('Kindred.ini', function (err, data) {
        console.log(data);
        //  {
        //      "Info": {
        //          "IconCircle": "Kindred_Circle.dds",
        //          "IconSquare": "Kindred_Square.dds"
        //      },
        //      "Data: {
        //          "SelectionHeight": 155,
        //          "Name": "game_character_displayname_Kindred",
        //          "BaseHP": 540,
        //          "BaseMP":300
        //          ...
        //      }
        //      ...
        //  }
    });

Available methods

N.B: All methods act as promises if no callback is passed.

parse(path, cb)

It will roughly parse a .ini file from the given path.

Parameters

  1. path {string} A path to where the file to parse resides.
  2. [cb] {Function} A callback called with (error, parsedData) as arguments.

read(path, cb)

It will read a .ini file from the given path, casting all the data into the right variable.

Parameters

  1. path {string} A path to where the file to read resides.
  2. [cb] {Function} A callback called with (error, readData) as arguments.

Package Sidebar

Install

npm i lol-ini-parser

Weekly Downloads

1

Version

0.9.1

License

MIT

Last publish

Collaborators

  • pupix