mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
added an _.zip()
This commit is contained in:
@@ -7,6 +7,13 @@ $(document).ready(function() {
|
||||
var func = function() { return "name: " + this.name; };
|
||||
var bound = _.bind(func, context);
|
||||
equals(bound(), 'name: moe', 'can bind a function to a context');
|
||||
|
||||
var func = function(salutation, name) { return salutation + ': ' + name; };
|
||||
func = _.bind(func, this, 'hello');
|
||||
equals(func('moe'), 'hello: moe', 'the function was partially applied in advance');
|
||||
|
||||
func = _.bind(func, this, 'curly');
|
||||
equals(func(), 'hello: curly', 'the function was completely applied in advance');
|
||||
});
|
||||
|
||||
test("functions: bindAll", function() {
|
||||
|
||||
Reference in New Issue
Block a user