index.js
function _segment (char) {
  var tmp
  char = char || '.'
  return function (k) {
    if (tmp) {
      tmp += char + k
      if (CLOSE.test(k)) {
        k = tmp
        tmp = ''
      } else {
        return
      }
    } else if (OPEN.test(k)) {
      tmp = k
      if (CLOSE.test(k)) {
        tmp = ''
      } else {
        return
      }
    }
    return k.trim().replace(QUOTES, '$2')
  }
}
function _segment (char) {
  var tmp
  char = char || '.'
  return function (k) {
    if (tmp) {
      tmp += char + k
      if (CLOSE.test(k)) {
        k = tmp
        tmp = ''
      } else {
        return
      }
    } else if (OPEN.test(k)) {
      tmp = k
      if (CLOSE.test(k)) {
        tmp = ''
      } else {
        return
      }
    }
    return k.trim().replace(QUOTES, '$2')
  }
}
function _segment ( char ) { var tmp char = char || '.' return function ( k ) { if ( tmp ) { tmp += char + k if ( CLOSE . test ( k ) ) { k = tmp tmp = '' } else { return } } else if ( OPEN . test ( k ) ) { tmp = k if ( CLOSE . test ( k ) ) { tmp = '' } else { return } } return k . trim ( ) . replace ( QUOTES , '$2' ) } }
segment path or properties string
@api private
@param {String} char - separator char
@return {Function}
segment path or properties string