function deepSet(target, key, value, separator) {
        if (separator === void 0) { separator = '.'; }
        while (true) {
            if ('object' !== typeof target) {
                return false;
            }
            var idx = key.indexOf(separator);
            if (idx < 0) {
                target[key] = value;
                return true;
            }
            var current = key.slice(0, idx);
            var nexts = key.slice(idx + 1);
            if (null == target[current]) {
                var next = nexts.split(separator, 1)[0];
                target[current] = next === "" + parseInt(next, 10) ? [] : {};
            }
            target = target[current];
            key = nexts;
        }
    }
/**
     * Set an object item to a given value using separator notation.
     *
     * @param {any} target
     * @param {string} key
     * @param {any} value
     * @param {string} separator
     * @return {boolean}
     */
Set an object item to a given value using separator notation.


Set an object item to a given value using separator notation .
function deepSet(target, key, value, separator) {
        if (separator === void 0) { separator = '.'; }
        while (true) {
            if ('object' !== typeof target) {
                return false;
            }
            var idx = key.indexOf(separator);
            if (idx < 0) {
                target[key] = value;
                return true;
            }
            var current = key.slice(0, idx);
            var nexts = key.slice(idx + 1);
            if (null == target[current]) {
                var next = nexts.split(separator, 1)[0];
                target[current] = next === "" + parseInt(next, 10) ? [] : {};
            }
            target = target[current];
            key = nexts;
        }
    }
function deepSet ( target , key , value , separator ) { if ( separator === void 0 ) { separator = '.' ; } while ( true ) { if ( 'object' !== typeof target ) { return false ; } var idx = key . indexOf ( separator ) ; if ( idx < 0 ) { target [ key ] = value ; return true ; } var current = key . slice ( 0 , idx ) ; var nexts = key . slice ( idx + 1 ) ; if ( null == target [ current ] ) { var next = nexts . split ( separator , 1 ) [ 0 ] ; target [ current ] = next === "" + parseInt ( next , 10 ) ? [ ] : { } ; } target = target [ current ] ; key = nexts ; } }
Set an object item to a given value using separator notation.
Set an object item to a given value using separator notation .