code: function getRows (elements, row) {
    if (!row) {
      return [ elements ]
    }
  
    let lastOffset = false
  
    return elements.reduce((rows, el) => {
  
      if (lastOffset !== el.offsetTop) {
        rows.push([el])
      } else {
        rows[rows.length - 1].push(el)
      }
  
      lastOffset = el.offsetTop
  
      return rows
  
    }, [])
  }
docs: Copyright (c) 2013-2018 YOOtheme GmbH, getuikit.com