From f320d9243ae43b0e0a1ce0f349fd42412aa8a859 Mon Sep 17 00:00:00 2001 From: Michael Diarmid Date: Wed, 17 Jan 2018 15:21:21 +0000 Subject: [PATCH] Update index.js --- lib/utils/index.js | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/lib/utils/index.js b/lib/utils/index.js index 09e3d657..994bab1d 100644 --- a/lib/utils/index.js +++ b/lib/utils/index.js @@ -340,30 +340,6 @@ export function nativeToJSError(code: string, message: string, additionalProps?: return error; } -/** - * TODO is this needed? - * Prepends appName arg to all native method calls - * @param appName - * @param NativeModule - */ -export function nativeWithApp(appName: string, NativeModule: Object) { - const native = {}; - const methods = Object.keys(NativeModule); - - for (let i = 0, len = methods.length; i < len; i++) { - const method = methods[i]; - if (isFunction(NativeModule[method])) { - native[method] = (...args) => { - return NativeModule[method](...[appName, ...args]); - }; - } else { - native[method] = NativeModule[method]; - } - } - - return native; -} - /** * * @param object