mesqueeb/copy-anything

[Feat Request] would be great to have exclude keys option

ShravanSunder opened this issue · 1 comments

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.

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 }