Adapter
call
Given a key and a set of arguments, call them when given a context. Primarily useful in composition.
Use a closure to call a stored key with stored arguments.
const call = (key, ...args) => context => context[key](...args); + }
30 seconds of code Curated collection of useful JavaScript snippets that you can understand in 30 seconds or less.
](https://github.com/Chalarangelo)
](https://github.com/Pl4gue)
](https://github.com/fejes713)
](https://github.com/kingdavidmartins)
](https://github.com/iamsoorena)