Created
April 11, 2023 01:18
-
-
Save mathiasgheno/a39283c6f12f099574c7441a9ca6e3fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @nosideeffects | |
* @param obj {Object} | |
* @param props {string[]} | |
* @return {Object} | |
*/ | |
function makeLowerCase(obj, props) { | |
const _obj = { ...obj }; | |
for (let prop of props) { | |
_obj[prop] = obj[prop].toLowerCase(); | |
} | |
return _obj; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment