summary refs log tree commit diff
path: root/src/gateway
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-13 19:45:44 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-04-13 19:45:44 +1000
commit5a6cb33f5ead561cd2ac82afc7be6a00fc0707f7 (patch)
treee0a8a3b967a99b4a5c95c8b5a69a0b8a938c7a16 /src/gateway
parentscripts n shit (diff)
parentfix style action (diff)
downloadserver-5a6cb33f5ead561cd2ac82afc7be6a00fc0707f7.tar.xz
Merge branch 'master' into feat/refactorIdentify
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/opcodes/LazyRequest.ts9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/gateway/opcodes/LazyRequest.ts b/src/gateway/opcodes/LazyRequest.ts

index 3cc2b655..64e50d92 100644 --- a/src/gateway/opcodes/LazyRequest.ts +++ b/src/gateway/opcodes/LazyRequest.ts
@@ -26,6 +26,7 @@ import { LazyRequestSchema, User, Presence, + partition, } from "@spacebar/util"; import { WebSocket, @@ -302,11 +303,3 @@ export async function onLazyRequest(this: WebSocket, { d }: Payload) { }, }); } - -/* https://stackoverflow.com/a/50636286 */ -function partition<T>(array: T[], filter: (elem: T) => boolean) { - const pass: T[] = [], - fail: T[] = []; - array.forEach((e) => (filter(e) ? pass : fail).push(e)); - return [pass, fail]; -}