You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
402 B

4 years ago
  1. 'use strict';
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = getArguments;
  6. function getArguments(node) {
  7. return node.nodes.reduce((list, child) => {
  8. if (child.type !== 'div') {
  9. list[list.length - 1].push(child);
  10. } else {
  11. list.push([]);
  12. }
  13. return list;
  14. }, [[]]);
  15. }
  16. module.exports = exports['default'];