lib/parser.js
function findPrev(type/*: string*/, element/*: Cheerio*/) {
  let tries = 5
  let prev = element

  do {
    if (prev.is(type)) {
      return prev
    }

    prev = prev.prev()
  }
  while (--tries)

  return prev
}
function findPrev(type/*: string*/, element/*: Cheerio*/) {
  let tries = 5
  let prev = element

  do {
    if (prev.is(type)) {
      return prev
    }

    prev = prev.prev()
  }
  while (--tries)

  return prev
}
function findPrev ( type /*: string*/ , element /*: Cheerio*/ ) { let tries = 5 let prev = element do { if ( prev . is ( type ) ) { return prev } prev = prev . prev ( ) } while ( -- tries ) return prev }
Find previous special typed element in siblings
Find previous special typed element in siblings