source: node_modules/d3-selection/src/selection/selectChildren.js@ a762898

Last change on this file since a762898 was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 421 bytes
RevLine 
[e4c61dd]1import {childMatcher} from "../matcher.js";
2
3var filter = Array.prototype.filter;
4
5function children() {
6 return Array.from(this.children);
7}
8
9function childrenFilter(match) {
10 return function() {
11 return filter.call(this.children, match);
12 };
13}
14
15export default function(match) {
16 return this.selectAll(match == null ? children
17 : childrenFilter(typeof match === "function" ? match : childMatcher(match)));
18}
Note: See TracBrowser for help on using the repository browser.