mirror of
https://github.com/Doodle3D/Doodle3D-API
synced 2024-12-23 14:13:47 +01:00
13 lines
269 B
JavaScript
13 lines
269 B
JavaScript
/* */
|
|
var $ = require("./$");
|
|
module.exports = function(object, el) {
|
|
var O = $.toObject(object),
|
|
keys = $.getKeys(O),
|
|
length = keys.length,
|
|
index = 0,
|
|
key;
|
|
while (length > index)
|
|
if (O[key = keys[index++]] === el)
|
|
return key;
|
|
};
|