mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-07 05:25:45 +01:00
Use completion.buffer for tabs.switchTo/:buffer!.
--HG-- extra : rebase_source : 91bb7fa4c4573048721f65c3aa871370300e7979
This commit is contained in:
@@ -1071,6 +1071,17 @@ const array = Class("array", Array, {
|
||||
equals: function (ary1, ary2)
|
||||
ary1.length === ary2.length && Array.every(ary1, function (e, i) e === ary2[i]),
|
||||
|
||||
/**
|
||||
* Returns the first member of the given array that matches the
|
||||
* given predicate.
|
||||
*/
|
||||
first: function first(ary, pred, self) {
|
||||
for (let elem in values(ary))
|
||||
if (pred.call(self, elem))
|
||||
return elem;
|
||||
return undefined;
|
||||
},
|
||||
|
||||
/**
|
||||
* Flattens an array, such that all elements of the array are
|
||||
* joined into a single array:
|
||||
|
||||
Reference in New Issue
Block a user