src/core/core.js
function(key, value) {
        var data = {},
            keys,
            first,
            subkey;
        if (key.indexOf(".") > -1) {
            keys = key.split(".");
            first = keys.shift();
            subkey = keys.join(".");
            data[first] = this._set_create_object(subkey, value);
        } else {
            data[key] = value;
        }
        return data;
    }
function(key, value) {
        var data = {},
            keys,
            first,
            subkey;
        if (key.indexOf(".") > -1) {
            keys = key.split(".");
            first = keys.shift();
            subkey = keys.join(".");
            data[first] = this._set_create_object(subkey, value);
        } else {
            data[key] = value;
        }
        return data;
    }
function ( key , value ) { var data = { } , keys , first , subkey ; if ( key . indexOf ( "." ) > - 1 ) { keys = key . split ( "." ) ; first = keys . shift ( ) ; subkey = keys . join ( "." ) ; data [ first ] = this . _set_create_object ( subkey , value ) ; } else { data [ key ] = value ; } return data ; }
If you are setting a key of 'foo.bar' or 'bar', this creates
the appropriate object for you to recursively merge with the
current attributes.
If you are setting a key of foo . bar or bar this creates the appropriate object for you to recursively merge with the current attributes .