(client: any, path: string, params: any)
| 10 | * @returns {Promise<any>} The result of the method invocation. |
| 11 | */ |
| 12 | export async function resolveAndInvoke(client: any, path: string, params: any): Promise<any> { |
| 13 | const slugs = path.split('/') |
| 14 | const method = slugs.reduce((acc, key) => acc?.[key], client) |
| 15 | const parentContext = slugs.slice(0, -1).reduce((acc, key) => acc?.[key], client) |
| 16 | return await method.bind(parentContext)(params) |
| 17 | } |
no outgoing calls
no test coverage detected