update
This commit is contained in:
9
APP/nexus-remote/node_modules/peerjs-js-binarypack/__test__/util.ts
generated
vendored
Normal file
9
APP/nexus-remote/node_modules/peerjs-js-binarypack/__test__/util.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { pack, Packable, unpack, Unpackable } from "../lib/binarypack";
|
||||
|
||||
export const packAndUnpack = <T extends Unpackable>(data: Packable) => {
|
||||
const encoded = pack(data);
|
||||
if (encoded instanceof Promise) {
|
||||
return encoded.then(unpack<T>);
|
||||
}
|
||||
return unpack<T>(encoded);
|
||||
};
|
||||
Reference in New Issue
Block a user