lol-lockfile-parser
v1.0.2
Published
A parser for lockfile files from League of Legends.
Downloads
97
Maintainers
Readme
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
- 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
- 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
- input {string|Buffer} A path to where the file to read resides.
- output {string} The path where the file should be stored.