{"ast":null,"code":"export * from './types';\n\nvar dividePoints = function dividePoints(points, keyword) {\n  if (!keyword) {\n    return [[], points];\n  }\n\n  var matched = [];\n  var missing = [];\n  points.forEach(function (point) {\n    if (point.name.includes(keyword)) {\n      matched.push(point);\n      return;\n    }\n\n    missing.push(point);\n  });\n  return [matched, missing];\n};\n\nvar combineLabel = function combineLabel(points, labels, visibility) {\n  return points.map(function (value, i) {\n    var name = labels[i] || '';\n    return {\n      name: name,\n      showing: !!visibility,\n      value: value\n    };\n  });\n};\n\nexport var divide = function divide(_ref) {\n  var points = _ref.points,\n      keyword = _ref.keyword,\n      labels = _ref.labels,\n      visibility = _ref.visibility;\n  return dividePoints(combineLabel(points, labels, visibility), keyword);\n};","map":null,"metadata":{},"sourceType":"module"}