seasonedcc / development-of-composable-functions

Types and functions to make composition easy and safe
MIT License
1 stars 0 forks source link

mapParameters draft - to quench your thirst for flips #26

Closed diogob closed 6 months ago

gustavoguichard commented 6 months ago

A - simplified - use case I had for such helper:

const getUser = composable(({ id }: { id: string }) => ({ id, name: 'John' }))
const getCurrentUser = mapParameters(getUser, (_i, env: { userId: string }) => [{ id: env.userId }])