[Feat Request] would be great to have exclude keys option
ShravanSunder opened this issue · comments
Shravan Sunder commented
props in Option is great. However it would be great to have an exclude keys option as well.
That way we can exclude certain keys.
Luca Ban commented
Thanks! I offloaded that logic into a separate utility.
Try this:
import { copy } from 'copy-anything'
import { omit } from 'filter-anything'
const copied = omit(copy({ a: 1, b: 2}), ['b'])
// { a: 1 }