Advertisement
bai_onzi

usable properties

Apr 26th, 2023
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default function (data) {
  2.     return data.map(object => {
  3.       const resObj = {};
  4.       const usingProp = object.usable;
  5.       usingProp.filter((prop) => usingProp.hasOwnProperty[prop] = resObj[prop] = object[prop]);
  6.       return resObj
  7.     })
  8.   }
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement