mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 08:57:49 +00:00
Added support for ECMAScript 5 native bind method if available. Additional unit test to cover multiple argument binds.
This commit is contained in:
@@ -20,6 +20,10 @@ $(document).ready(function() {
|
||||
|
||||
var func = _.bind(func, this, 'curly');
|
||||
equals(func(), 'hello: curly', 'the function was completely applied in advance');
|
||||
|
||||
var func = function(salutation, firstname, lastname) { return salutation + ': ' + firstname + ' ' + lastname };
|
||||
func = _.bind(func, this, 'hello', 'moe', 'curly');
|
||||
equals(func(), 'hello: moe curly', 'the function was partially applied in advance and can accept multiple arguments');
|
||||
});
|
||||
|
||||
test("functions: bindAll", function() {
|
||||
|
||||
Reference in New Issue
Block a user