mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Updated 'bind' documentation to reflect native support.
This commit is contained in:
@@ -407,6 +407,7 @@
|
|||||||
|
|
||||||
// Create a function bound to a given object (assigning `this`, and arguments,
|
// Create a function bound to a given object (assigning `this`, and arguments,
|
||||||
// optionally). Binding with arguments is also known as `curry`.
|
// optionally). Binding with arguments is also known as `curry`.
|
||||||
|
// Delegates to **ECMAScript 5**'s native `Object.bind` if available.
|
||||||
_.bind = function(func, obj) {
|
_.bind = function(func, obj) {
|
||||||
var args = slice.call(arguments, 2);
|
var args = slice.call(arguments, 2);
|
||||||
if(nativeBind && func.bind === nativeBind) return FuncProto.bind.apply(func, slice.call(arguments, 1));
|
if(nativeBind && func.bind === nativeBind) return FuncProto.bind.apply(func, slice.call(arguments, 1));
|
||||||
|
|||||||
Reference in New Issue
Block a user