MCPcopy Create free account
hub / github.com/Make-md/makemd / insertMulti

Function insertMulti

src/shared/utils/array.ts:10–17  ·  view source on GitHub ↗
(arr: any[], index: number, newItem: any[])

Source from the content-addressed store, hash-verified

8];
9
10export const insertMulti = (arr: any[], index: number, newItem: any[]) => !index || index <= 0 ? [
11 ...newItem,
12 ...arr,
13] : [
14 ...arr.slice(0, index),
15 ...newItem,
16 ...arr.slice(index),
17];
18
19export const uniq = (a: any[]) => [...new Set(a)];
20export const uniqCaseInsensitive = (a: string[]) => [

Callers 4

ungroupNodeFunction · 0.90
reorderRowsForPathFunction · 0.90
insertRowsIfUniqueFunction · 0.90
insertRowsFunction · 0.90

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected