You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constomit=(obj,keys)=>Object.fromEntries(Object.entries(obj).filter(([k])=>![keys].flat().includes(k)));// orconst{ a, b, ...rest}=obj;// with a predicate fnconstomitBy=(obj,fn)=>Object.fromEntries(Object.entries(obj).filter(([k,v])=>fn(v,k,obj)));
Activity
43081j commentedon Nov 9, 2026
i would just use the first one and simplify it. it doesn't need to flatten keys, just assume keys is already a flat array