UNPKG

d3-selection

Version:

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

9 lines (7 loc) 300 B
import array from "./array.js"; import {Selection, root} from "./selection/index.js"; export default function(selector) { return typeof selector === "string" ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) : new Selection([array(selector)], root); }