4.3.1 • Published 2 years ago

gobby-ts v4.3.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Gobby-TS

Gobby wrapper for TypeScript.

Example

import { Gobby, Message, ö } from "../src";

(async () => {
    const gobby = new Gobby("ws://localhost:8080");

    try {
        await gobby.connect();
    } catch (e) {
        console.error(e);
        return;
    }

    // join lobby
    const user = await gobby.join("foo");
    if (!user) {
        console.error("[Gobby] failed to join lobby");
        return;
    }
    console.log("[Gobby] joined lobby as:", user);

    gobby.handle("VERSION", (msg: Message) => {
        console.log("[Gobby] received backend version:", msg.args);

        // respond with client version
        if (msg.reply) {
            gobby.send(ö("VERSION", "1.0.0"), msg);
        }
    });
})();
1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

1.3.2

2 years ago

1.1.4

2 years ago

1.4.0

2 years ago

1.1.3

2 years ago

1.3.0

2 years ago

1.1.2

2 years ago

4.3.1

2 years ago

4.1.0

2 years ago

4.0.0

2 years ago

4.3.0

2 years ago

4.2.0

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago