index.js
function _splitPath (keys) {
  var out

  if (util.isString(keys)) {
    out = []
    keys
      .split('.')
      .map(_segment('.'))
      .forEach(function (k) {
        k = (k || ' ').trim()
          .replace(/^([^[]+)\[(["']?)(.+)\2\]$/, function (m, m1, m2, m3) {
            if (m1 && m3) {
              out.push(m1, m3)
            }
            return ''
          })
        if (k) {
          out.push(k)
        }
      })
    keys = out
  }
  return keys
}
function _splitPath (keys) {
  var out

  if (util.isString(keys)) {
    out = []
    keys
      .split('.')
      .map(_segment('.'))
      .forEach(function (k) {
        k = (k || ' ').trim()
          .replace(/^([^[]+)\[(["']?)(.+)\2\]$/, function (m, m1, m2, m3) {
            if (m1 && m3) {
              out.push(m1, m3)
            }
            return ''
          })
        if (k) {
          out.push(k)
        }
      })
    keys = out
  }
  return keys
}
function _splitPath ( keys ) { var out if ( util . isString ( keys ) ) { out = [ ] keys . split ( '.' ) . map ( _segment ( '.' ) ) . forEach ( function ( k ) { k = ( k || ' ' ) . trim ( ) . replace ( / ^([^[]+)\[(["']?)(.+)\2\]$ / , function ( m , m1 , m2 , m3 ) { if ( m1 && m3 ) { out . push ( m1 , m3 ) } return '' } ) if ( k ) { out . push ( k ) } } ) keys = out } return keys }
split dot separated String or Array into a property path
@private
@param {Array|String} keys
@return {Object} obj for comparison
split dot separated String or Array into a property path