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

Function includes

apps/chart/src/helpers/utils.ts:104–115  ·  view source on GitHub ↗
(arr: T[], searchItem: T, searchIndex?: number)

Source from the content-addressed store, hash-verified

102}
103
104export function includes<T>(arr: T[], searchItem: T, searchIndex?: number) {
105 if (typeof searchIndex === 'number' && arr[searchIndex] !== searchItem) {
106 return false;
107 }
108 for (const item of arr) {
109 if (item === searchItem) {
110 return true;
111 }
112 }
113
114 return false;
115}
116
117export function pick<T extends object, K extends keyof T>(obj: T, ...propNames: K[]) {
118 const resultMap = {} as Pick<T, K>;

Callers 15

initializeMethod · 0.90
renderGroupedModelsMethod · 0.90
getSeriesNamesMethod · 0.90
initializeMethod · 0.90
renderTickModelsMethod · 0.90
onMousemoveMethod · 0.90
getDivisorForPercentFunction · 0.90
getBubbleRectFunction · 0.90
getSeriesThemeFunction · 0.90
useRectIconFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected