Advertisement
IcaroPeretti

mapObjFunc

Sep 9th, 2021
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data Copied
Advertisement