mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
10 lines
299 B
JavaScript
10 lines
299 B
JavaScript
var $ = require('./$')
|
|
, toIObject = require('./$.to-iobject');
|
|
module.exports = function(object, el){
|
|
var O = toIObject(object)
|
|
, keys = $.getKeys(O)
|
|
, length = keys.length
|
|
, index = 0
|
|
, key;
|
|
while(length > index)if(O[key = keys[index++]] === el)return key;
|
|
}; |