thi-ng/umbrella

View on GitHub
packages/object-utils/src/dissoc.ts

Summary

Maintainability
A
0 mins
Test Coverage
import type { IObjectOf } from "@thi.ng/api";

export const dissocObj = <T>(
    obj: IObjectOf<T>,
    keys: Iterable<string | number>
) => {
    for (let k of keys) {
        delete obj[k];
    }
    return obj;
};