// TODO: A lot of this stuff could probably live in core-utils instead.
// Review this file eventually for stuff that could go into core-utils.
/**
* Returns a copy of the given object ({ ...obj }) with the given keys omitted.
*
* @param obj Object to return with the keys omitted.
* @param keys Keys to omit from the returned object.
* @returns A copy of the given object with the given keys omitted.
*/
export const omit = <T extends object, K extends string | number | symbol>(
obj: T,
...keys: K[]
): Omit<T, K> => {
const copy = { ...obj }
for (const key of keys) {
delete copy[key as string]
}
return copy
}
-
Will Cory authored
* Fix a bunch of nits chain id enum nit more utils nits fix the rest of the nits fix comment being moved remove comment that is no longer needed * add comment to isL2Provider so jsdocs works and change comment * yarn changeset Co-authored-by:
Will Cory <willcory@Wills-MacBook-Pro.local> Co-authored-by:
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
a9f8e577