0.1.3 • Published 3 years ago

@perion/net v0.1.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

@perion/net

A library for manipulating MapleStory packets.

Installation

npm i --save @perion/net

Usage

const net = require('@perion/net');

/** Example buffer */
const data = Buffer.from([1, 2]);

/** net.Packet.Parser example */
const packet = new net.Packet.Parser(data);
const fields = ['id', 'name', 'hp'];
const unpacked = packet.int().mapleascii().int().collect(fields);

/** Returns {id: <number>, name: <string>, hp: <number>} */

/** net.Packet.Writer example */

/** Initialize with length */
let packet = new net.Packet.Writer(5);
packet = packet.byte(0x0).int(9).buffer();

/** Returns the buffer with data */
0.1.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.1.3

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago