UNPKG

d3-selection

Version:

Data-driven DOM manipulation: select elements and join them to data.

6 lines (5 loc) 199 B
export default function(x) { return typeof x === "object" && "length" in x ? x // Array, TypedArray, NodeList, array-like : Array.from(x); // Map, Set, iterable, string, or anything else }