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

Function forEach

apps/chart/src/helpers/utils.ts:46–55  ·  view source on GitHub ↗
(
  obj: T,
  cb: (item: V, key: K) => void
)

Source from the content-addressed store, hash-verified

44}
45
46export function forEach<T extends object, K extends Extract<keyof T, string>, V extends T[K]>(
47 obj: T,
48 cb: (item: V, key: K) => void
49) {
50 for (const key in obj) {
51 if (obj.hasOwnProperty(key)) {
52 cb(obj[key as K] as V, key as K);
53 }
54 }
55}
56
57export function forEachArray<T>(
58 arr: Array<T> | ArrayLike<T>,

Callers 2

setModuleMethod · 0.90
mergeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected