dunno how we ended up here but I would rather use this approach in a private
scope:
var
// used to trap function calls via bind
invoke = Function.call,
// normal use cases
bind = invoke.bind(invoke.bind),
apply = bind(invoke, invoke.apply),
call = bind(invoke, invoke)
;
var hasOwnProperty = bind(invoke, {}.hasOwnProperty);
hasOwnProperty({key:1}, "key"); // true
call([].slice, [1,2,3], 1); // 2,3
apply([].slice, [1,2,3], [1]); // 2,3
Regards,
Andrea Giammarchi
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss