Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getItemId(itemName) {
for(var key in items) {
if(items.hasOwnProperty(key)) {
if(items[key] == itemName) {
return key;
}
}
}
}
getItemName(itemId) {
for (var key in items) {
if (items.hasOwnProperty(key)) {
if (key == itemId) {
return items[key];
}
}
}
}