IcaroPeretti

mapObjFunc

Sep 9th, 2021
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. const mapObj = (obj: any) => {
  2. for (var [key, value] of Object.entries(obj)) {
  3. if (value !== undefined) {
  4. obj[key] = value
  5. }
  6. return obj
  7. }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment