Add another code example to _.invoke documentation.

Former-commit-id: 0bea74a470771ebc5cf2110243b38db3698cde52
This commit is contained in:
John-David Dalton
2012-06-10 12:54:14 -04:00
parent 7faa849a89
commit 2da05d88a0
2 changed files with 101 additions and 95 deletions

View File

@@ -1171,6 +1171,9 @@
*
* _.invoke([[5, 1, 7], [3, 2, 1]], 'sort');
* // => [[1, 5, 7], [1, 2, 3]]
*
* _.invoke([123, 456], String.prototype.split, '');
* // => [['1', '2', '3'], ['4', '5', '6']]
*/
function invoke(array, methodName) {
var result = [];
@@ -3096,7 +3099,7 @@
}
/**
* A JavaScript micro-templating method, similar to John Resig's implementation.
* A micro-templating method, similar to John Resig's implementation.
* Lo-Dash templating handles arbitrary delimiters, preserves whitespace, and
* correctly escapes quotes within interpolated code.
*