index.js 402 B

1234567891011121314151617
  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'];