1
0
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:
Kris Maglione
2010-12-06 22:57:04 -05:00
parent 9c0cc5d19b
commit 175cd126b7
3 changed files with 22 additions and 42 deletions

View File

@@ -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: