UNPKG

keystone

Version:

Web Application Framework and Admin GUI / Content Management System built on Express.js and Mongoose

13 lines (11 loc) 310 B
/* Tidier binding for component methods to Classes =============================================== constructor() { super(); bindFunctions.call(this, ['handleClick', 'handleOther']); } */ module.exports = function bindFunctions (functions) { functions.forEach(f => (this[f] = this[f].bind(this))); };