1.0.0 • Published 5 years ago
dsparser v1.0.0
DSParser Package
This package implements Typescript Interfaces and functions for parsing raw WorldData for the Browsergame 'Die Stämme/TribalWars'
Installation
This module is installed via npm:
npm install --save dsparser
Usage
Typescript
import dsparser from 'dsparser';
// put inside Async code because parsing is async
async function foo(worldName: string, data: string[]){
const parser = new dsparser(worldName);
// possible to parse in parallel but not recommended
await parser.parseVillage(data[0]);
await parser.parsePlayer(data[1]);
await parser.parseAlly(data[2]);
// call after parsePlayer()
await parser.parsePlayerKills(data[3], data[4], data[5], data[6]);
// call after parseAlly()
await parser.parseAllyKills(data[7], data[8], data[9]);
// Output data:
const player: IplayerDB[] = parser.getPlayerArray();
const ally: IallyDB[] = parser.getAllyArray();
}
### Interfaces
```ts
....
Note
This project was bootstrapped with TSDX.
1.0.0
5 years ago
0.4.1
5 years ago
0.4.0
5 years ago
0.3.5
5 years ago
0.3.4
5 years ago
0.3.3
5 years ago
0.3.2
5 years ago
0.3.1
5 years ago
0.3.0
5 years ago
0.2.3
5 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.2
5 years ago
0.1.3
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago