* subfunction of checkMultiLangConsistency * checks whether a given string exist as the value of key in an object * * @param {string} searchedString * @param {object} searchedObject
(searchedString, searchedObject)
| 605 | * @param {object} searchedObject |
| 606 | */ |
| 607 | function isStringObjectKeyValue(searchedString, searchedObject){ |
| 608 | const objKeys = Object.keys(searchedObject) |
| 609 | if(objKeys.length === 0) return false // if the object is empty, then the string cannot exist here |
| 610 | for (let index = 0; index < objKeys.length; index++) { |
| 611 | const element = objKeys[index] |
| 612 | if (searchedObject[element] === searchedString) { |
| 613 | return true // found where the string is in the object |
| 614 | } else { |
| 615 | // nothing keep going, maybe in another key |
| 616 | } |
| 617 | } |
| 618 | return false |
| 619 | } |
| 620 | |
| 621 | |
| 622 | /** |
no outgoing calls
no test coverage detected