const api = { show(params) { console.log(params) } } function doApi(func = () => { }, params) { func(params) } doApi(api.show, 1)