Files
30-seconds-of-code/test/bindKey/bindKey.js
2018-08-10 11:40:33 +04:00

3 lines
139 B
JavaScript

const bindKey = (context, fn, ...boundArgs) => (...args) => context[fn].apply(context, [...boundArgs, ...args]);
module.exports = bindKey;