MCPcopy Create free account
hub / github.com/breck7/scroll / arraylike

Function arraylike

external/.d3.js:1950–1954  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

1948// cause the data to change while iterating by using a key function, but please
1949// don’t; we’d rather avoid a gratuitous copy.)
1950function arraylike(data) {
1951 return typeof data === "object" && "length" in data
1952 ? data // Array, TypedArray, NodeList, array-like
1953 : Array.from(data); // Map, Set, iterable, string, or anything else
1954}
1955
1956function selection_exit() {
1957 return new Selection$1(this._exit || this._groups.map(sparse), this._parents);

Callers 1

selection_dataFunction · 0.85

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected