MCPcopy Create free account
hub / github.com/blacksmithgu/datacore / wrap

Method wrap

src/api/data-array.ts:184–192  ·  view source on GitHub ↗
(
        arr: T[],
        defaultComparator: ArrayComparator<unknown> = DataArray.defaultComparator
    )

Source from the content-addressed store, hash-verified

182 };
183
184 public static wrap<T>(
185 arr: T[],
186 defaultComparator: ArrayComparator<unknown> = DataArray.defaultComparator
187 ): DataArray<T> {
188 return new Proxy<DataArrayImpl<T>>(
189 new DataArrayImpl<T>(arr, defaultComparator),
190 DataArrayImpl.ARRAY_PROXY as ProxyHandler<DataArrayImpl<T>>
191 );
192 }
193
194 public length: number;
195 [index: number]: T;

Callers 8

arrayMethod · 0.80
useArrayMethod · 0.80
arrayMethod · 0.80
lwrapMethod · 0.80
wrapFunction · 0.80
fromFunction · 0.80
parser.tsFile · 0.80
createFunctionFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected