lib/keypath.js
function _join(pre, tail) {
    var _hasBegin = !!pre
    if(!_hasBegin) pre = ''
    if (/^\[.*\]$/.exec(tail)) return pre + tail
    else if (typeof(tail) == 'number') return pre + '[' + tail + ']'
    else if (_hasBegin) return pre + '.' + tail
    else return tail
}
function _join(pre, tail) {
    var _hasBegin = !!pre
    if(!_hasBegin) pre = ''
    if (/^\[.*\]$/.exec(tail)) return pre + tail
    else if (typeof(tail) == 'number') return pre + '[' + tail + ']'
    else if (_hasBegin) return pre + '.' + tail
    else return tail
}
function _join ( pre , tail ) { var _hasBegin = ! ! pre if ( ! _hasBegin ) pre = '' if ( / ^\[.*\]$ / . exec ( tail ) ) return pre + tail else if ( typeof ( tail ) == 'number' ) return pre + '[' + tail + ']' else if ( _hasBegin ) return pre + '.' + tail else return tail }
append path to a base path
append path to a base path