Skip to content

Commit 40698b5

Browse files
committed
rc.16 - updating dependency versions, adding crc32 back, and a helper function to perform async forEach
1 parent b1dadfa commit 40698b5

File tree

8 files changed

+3022
-174
lines changed

8 files changed

+3022
-174
lines changed

README.md

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,56 @@
11
[![RuneJS Discord Server](https://img.shields.io/discord/678751302297059336?label=RuneJS%20Discord&logo=discord)](https://discord.gg/5P74nSh)
22

3-
4-
![RuneJS](https://i.imgur.com/pmkdSfc.png)
5-
6-
# @runejs/common
7-
8-
Common logging, networking, compression, and other additional functionality for RuneJS applications.
9-
10-
### @runejs/common
11-
* `logger` is exported as a singleton Pino logging wrapper, offering the following functions:
12-
* `logger.info(...messages)`
13-
* `logger.debug(...messages)`
14-
* `logger.warn(...messages)`
15-
* `logger.error(...messages)`
16-
* `logger.fatal(...messages)`
17-
* `logger.trace(...messages)`
18-
* Ability to set the Pino logging date/time formatting function via `setLoggerTimeFn(Pino.TimeFn)`
19-
* Ability to set the Pino logging pretty print config value via `setLoggerPrettyPrint(boolean)`
20-
* Setting of _all_ Pino logging options via `setLoggerOptions(Pino.LoggerOptions)`
21-
22-
### @runejs/common/buffer
23-
* `ByteBuffer` is the main export.
3+
[![RuneJS](https://i.imgur.com/QSXNzwC.png)](https://github.com/runejs/)
4+
5+
# Common
6+
7+
Common logging, networking, compression, and other miscellaneous functionality for RuneJS.
8+
9+
## Exported Modules
10+
11+
### `@runejs/common`
12+
* `logger` is exported as a singleton Pino logging wrapper.
13+
* Methods:
14+
* `logger.info(...messages: any[])`
15+
* `logger.debug(...messages: any[])`
16+
* `logger.warn(...messages: any[])`
17+
* `logger.error(...messages: any[])`
18+
* `logger.trace(...messages: any[])`
19+
* `logger.fatal(...messages: any[])`
20+
* `logger.destination(logDir: string)`
21+
* `logger.setOptions(options: Pino.LoggerOptions)`
22+
* `logger.setPrettyPrint(prettyPrint: boolean)`
23+
* `logger.setTimeFormat(format: TimeFn)`
24+
* `ByteBuffer` is also exported at the root level.
2425
* Node `Uint8Array` wrapper with additional utility functions.
2526
* Unified configurable `get` and `put` methods to easily move bytes within the buffer.
2627
* Int24, Smart, Long and String type support.
2728
* Big endian, little endian, and mixed endian support.
2829
* Bit access through `openBitBuffer()`, `putBits()`, and `closeBitBuffer()`
2930

30-
### @runejs/common/net
31-
* `SocketServer`
32-
* Handles connections made to a RuneJS socket server.
33-
* `SocketServer.launch(serverName, hostName, port, connectionHandlerFactory)`
34-
* Spins up a new Node Socket server with the specified host and port.
35-
* `ServerConfigOptions`
36-
* Options for a configured Socket server, imported using the `parseServerConfig()` function.
31+
### `@runejs/common/color`
32+
Handles various color conversions needed by the game and tooling.
33+
* `RGB(A)`
34+
* `HSL` (Hue, Saturation, Lightness)
35+
* `HSV` (Hue, Saturation, Value/Brightness)
36+
* `HCL` (Hue, Chroma, Luminance)
37+
* `LAB` (Lightness, A, B)
3738

38-
### @runejs/common/compression
39+
### `@runejs/common/compress`
3940
* Exported class `Gzip` handles Gzip compression and decompression.
4041
* Exported class `Bzip2` handles Bzip2 compression and decompression.
4142

42-
### @runejs/common/encryption
43+
### `@runejs/common/crc32`
44+
Exports a single class `Crc32` that generates CRC32 checksums for binary data files.
45+
46+
### `@runejs/common/encrypt`
4347
Provides XTEA encryption and decryption functionality, as well as a key file loader.
4448
* Exported as class `Xtea`
4549

46-
### @runejs/common/color
47-
Handles various color conversions needed by the game and tooling.
48-
* `RGB(A)`
49-
* `HSL` (Hue, Saturation, Lightness)
50-
* `HSV` (Hue, Saturation, Value/Brightness)
51-
* `HCL` (Hue, Chroma, Luminance)
52-
* `LAB` (Lightness, A, B)
50+
### `@runejs/common/net`
51+
* `SocketServer`
52+
* Handles connections made to a RuneJS socket server.
53+
* `SocketServer.launch(serverName, hostName, port, connectionHandlerFactory)`
54+
* Spins up a new Node Socket server with the specified host and port.
55+
* `ServerConfigOptions`
56+
* Options for a configured Socket server, imported using the `parseServerConfig()` function.

0 commit comments

Comments
 (0)