MyCrypto/common/utils/helpers.ts

4 lines
114 B
TypeScript

export function getKeyByValue(object, value) {
return Object.keys(object).find(key => object[key] === value);
}