[Feat Request] would be great to have exclude keys option
ShravanSunder opened this issue · 1 comments
ShravanSunder 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.
mesqueeb 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 }