lib/check.js
function _prependPath(key, base) {
    if ((typeof key) === "number" || key.match(/^[0-9]+$/))
        key = "[" + key + "]";
    else if (!key.match(Match.IdentifierString) || _jsKeywords.indexOf(key) !== -1)
        key = JSON.stringify([key]);

    if (base && base[0] !== "[")
        return key + '.' + base;
    return key + base;
}
function _prependPath(key, base) {
    if ((typeof key) === "number" || key.match(/^[0-9]+$/))
        key = "[" + key + "]";
    else if (!key.match(Match.IdentifierString) || _jsKeywords.indexOf(key) !== -1)
        key = JSON.stringify([key]);

    if (base && base[0] !== "[")
        return key + '.' + base;
    return key + base;
}
function _prependPath ( key , base ) { if ( ( typeof key ) === "number" || key . match ( / ^[0-9]+$ / ) ) key = "[" + key + "]" ; else if ( ! key . match ( Match . IdentifierString ) || _jsKeywords . indexOf ( key ) !== - 1 ) key = JSON . stringify ( [ key ] ) ; if ( base && base [ 0 ] !== "[" ) return key + '.' + base ; return key + base ; }
Assumes the base of path is already escaped properly returns key + base
Assumes the base of path is already escaped properly returns key + base