(f)
| 203 | //HELPERS |
| 204 | |
| 205 | function key_(f) { |
| 206 | if (typeof f == 'string') |
| 207 | return function(p) { return p[f]; }; |
| 208 | if (typeof f == 'undefined') |
| 209 | return function(x) { return x; }; |
| 210 | return f; |
| 211 | } |
| 212 | |
| 213 | Array.prototype.max = function(key) { |
| 214 | key = key_(key); |
no outgoing calls
no test coverage detected