MCPcopy Create free account
hub / github.com/Keyang/node-csvtojson / filterArray

Function filterArray

src/util.ts:17–25  ·  view source on GitHub ↗
(arr: any[], filter: number[])

Source from the content-addressed store, hash-verified

15}
16
17export function filterArray(arr: any[], filter: number[]): any[] {
18 const rtn: any[] = [];
19 for (let i = 0; i < arr.length; i++) {
20 if (filter.indexOf(i) > -1) {
21 rtn.push(arr[i]);
22 }
23 }
24 return rtn;
25}
26
27export const trimLeft = function trimLeftNative(str: string) {
28 return str.trimStart();

Callers 2

parseMultiLinesMethod · 0.90
filterHeaderMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected