mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Ensure _.at can work as a callback for _.map and add similar unit tests for _.assign, _.defaults, _.merge, _.first, _.initial, _.last, and _.rest.
Former-commit-id: 92e71c6bae084029df3cc0e7af78af7ce7566be0
This commit is contained in:
@@ -2951,9 +2951,10 @@
|
||||
* // => ['moe', 'curly']
|
||||
*/
|
||||
function at(collection) {
|
||||
var index = -1,
|
||||
props = baseFlatten(arguments, true, false, 1),
|
||||
length = props.length,
|
||||
var args = arguments,
|
||||
index = -1,
|
||||
props = baseFlatten(args, true, false, 1),
|
||||
length = (args[2] && args[2][args[1]] === collection) ? 1 : props.length,
|
||||
result = Array(length);
|
||||
|
||||
if (support.unindexedChars && isString(collection)) {
|
||||
|
||||
Reference in New Issue
Block a user