MCPcopy
hub / github.com/vercel/next.js / fromArray

Method fromArray

packages/next/src/compiled/source-map08/source-map.js:29–35  ·  view source on GitHub ↗

* Static method for creating ArraySet instances from an existing array.

(aArray, aAllowDuplicates)

Source from the content-addressed store, hash-verified

27 * Static method for creating ArraySet instances from an existing array.
28 */
29 static fromArray(aArray, aAllowDuplicates) {
30 const set = new ArraySet();
31 for (let i = 0, len = aArray.length; i < len; i++) {
32 set.add(aArray[i], aAllowDuplicates);
33 }
34 return set;
35 }
36
37 /**
38 * Return how many unique items are in this ArraySet. If duplicates have been

Callers 3

constructorMethod · 0.80
BasicSourceMapConsumerFunction · 0.80
source-map.jsFile · 0.80

Calls 1

addMethod · 0.95

Tested by

no test coverage detected