Created
October 16, 2023 16:08
-
-
Save alekstar79/c170d8a5d111f7dd4b990f9db870b0a1 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
function omit(obj, keys) { | |
return Object.keys(obj) | |
.filter(key => !keys.includes(key)) | |
.reduce((acc, key) => { | |
acc[key] = obj[key] | |
return acc | |
}, {}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment