lib/collection/variable-list.js
function (obj) {
        var list = this;

        // in case user did not provide an object to mutate, create a new one
        !_.isObject(obj) && (obj = {});

        // delete extra variables from object that are not present in list
        _.forEach(obj, function (value, key) {
            !_.has(list.reference, key) && (delete obj[key]);
        });

        // we first sync all variables in this list to the object
        list.each(function (variable) {
            obj[variable.key] = variable.valueOf();
        });

        return obj;
    }
function (obj) {
        var list = this;

        // in case user did not provide an object to mutate, create a new one
        !_.isObject(obj) && (obj = {});

        // delete extra variables from object that are not present in list
        _.forEach(obj, function (value, key) {
            !_.has(list.reference, key) && (delete obj[key]);
        });

        // we first sync all variables in this list to the object
        list.each(function (variable) {
            obj[variable.key] = variable.valueOf();
        });

        return obj;
    }
function ( obj ) { var list = this ; // in case user did not provide an object to mutate, create a new one ! _ . isObject ( obj ) && ( obj = { } ) ; // delete extra variables from object that are not present in list _ . forEach ( obj , function ( value , key ) { ! _ . has ( list . reference , key ) && ( delete obj [ key ] ) ; } ) ; // we first sync all variables in this list to the object list . each ( function ( variable ) { obj [ variable . key ] = variable . valueOf ( ) ; } ) ; return obj ; }
Transfer all variables from this list to an object

@param {Object=} [obj]
@returns {Object}
Transfer all variables from this list to an object