From 49fc39ab08224681c92f6357fe855a17cb8b8374 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 27 Nov 2022 23:59:33 -0500 Subject: [PATCH] *protomux will automatically encode data to JSON, so just set value default to empty string --- src/index.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/index.ts b/src/index.ts index a829851..d5b908c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,15 +18,7 @@ export default class RPC extends ProtomuxRPC { super(stream, options); } - async request( - method: any, - value: Buffer | Uint8Array | string = b4a.from(""), - options = {} - ) { - if (!b4a.isBuffer(value)) { - value = b4a.from(value); - } - + async request(method: any, value: any | string = "", options = {}) { return super.request(method, value, options); } }