UNPKG

rambdax

Version:

Extended version of Rambda - a lightweight, faster alternative to Ramda

10 lines (7 loc) 218 B
import { curryN } from './curryN.js' export function bind(fn, thisObj){ if (arguments.length === 1){ return _thisObj => bind(fn, _thisObj) } return curryN(fn.length, (...args) => fn.apply(thisObj, args)) }