MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / keyOf

Function keyOf

lib/web/polyfill.js:208–215  ·  view source on GitHub ↗
(object, el)

Source from the content-addressed store, hash-verified

206 return T;
207};
208function keyOf(object, el){
209 var O = toObject(object)
210 , keys = getKeys(O)
211 , length = keys.length
212 , index = 0
213 , key;
214 while(length > index)if(O[key = keys[index++]] === el)return key;
215}
216
217// Array
218// array('str1,str2,str3') => ['str1', 'str2', 'str3']

Callers

nothing calls this directly

Calls 1

toObjectFunction · 0.70

Tested by

no test coverage detected