1 define(['../lang/isFunction'], function (isFunction) {
4 * Creates an object that holds a lookup for the objects in the array.
6 function toLookup(arr, key) {
12 var i = -1, len = arr.length, value;
13 if (isFunction(key)) {
16 result[key(value)] = value;
21 result[value[key]] = value;