MCPcopy Create free account
hub / github.com/ActiveState/code / key_

Function key_

recipes/JavaScript/579002_BaderOffer_Method/recipe-579002.js:205–211  ·  view source on GitHub ↗
(f)

Source from the content-addressed store, hash-verified

203//HELPERS
204
205function 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
213Array.prototype.max = function(key) {
214 key = key_(key);

Callers 3

get_agreement_list_Function · 0.85
recipe-579002.jsFile · 0.85
sum_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected