bind.js

  1. import curry from './curry'
  2. /**
  3. * @function bind
  4. * @description Bind a function to a context
  5. * @param {function }fn
  6. * @param {*} context
  7. * @returns {*}
  8. */
  9. export default curry(function bind (fn, context) {
  10. return fn.bind(context)
  11. })