Files
30-seconds-of-code/test/bindKey/bindKey.js
2018-08-10 19:56:44 +00:00

4 lines
141 B
JavaScript

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