all.js 611 B

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.default = void 0;
  4. var _one = _interopRequireDefault(require("./one"));
  5. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  6. /* Transform the children of `parent`. */
  7. function all(h, parent) {
  8. const nodes = parent.children || [];
  9. const {
  10. length
  11. } = nodes;
  12. const values = [];
  13. let index = -1;
  14. while (++index < length) {
  15. const result = (0, _one.default)(h, nodes[index], parent);
  16. values.push(result);
  17. }
  18. return values.filter(node => node);
  19. }
  20. var _default = all;
  21. exports.default = _default;