1.0.2 • Published 6 years ago

lol-lockfile-parser v1.0.2

Weekly downloads
87
License
MIT
Repository
github
Last release
6 years ago

lol-lockfile-parser

A parser for lockfile files from League of Legends.

Download

lol-lockfile-parser is installable via:

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

Usage example

var Parser = require('lol-lockfile-parser'),
    parser = new Parser();

    
    parser.read('lockfile').then(data => {
        console.log(data);
        //  {
        //    process: 'LeagueClient',
        //    PID: 6608,
        //    port: 18633,
        //    password: H9y4kOYVkmjWu_5mVIg1qQ,
        //    protocol: https
        //  }
    });

Available methods

parse(path)

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

Parameters

  1. path {string|Buffer} A path to where the file to parse resides.

read(path)

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

Parameters

  1. path {string|Buffer} A path to where the file to read resides.

extract(input, output)

It will extract a lockfile and extract the result on disk.

Parameters

  1. input {string|Buffer} A path to where the file to read resides.
  2. output {string} The path where the file should be stored.