MCPcopy
hub / github.com/nhn/tui.chart / omit

Function omit

apps/chart/src/helpers/utils.ts:128–137  ·  view source on GitHub ↗
(obj: T, ...propNames: K[])

Source from the content-addressed store, hash-verified

126}
127
128export function omit<T extends object, K extends keyof T>(obj: T, ...propNames: K[]) {
129 const resultMap = {} as Omit<T, K>;
130 Object.keys(obj).forEach((key) => {
131 if (!includes(propNames, key as K)) {
132 resultMap[key as OmittedKey<T, K>] = obj[key as OmittedKey<T, K>];
133 }
134 });
135
136 return resultMap;
137}
138
139export function pickProperty(target: Record<string, any>, keys: string[]) {
140 const { length } = keys;

Callers 6

calculateDatetimeScaleFunction · 0.90
getDataLabelsMethod · 0.90
makeDataLabelMethod · 0.90
utils.spec.tsFile · 0.90

Calls 2

includesFunction · 0.85
forEachMethod · 0.45

Tested by

no test coverage detected