lib/collection/variable-scope.js
function (key) {
        var lastDisabledVariable;

        this.values.remove(function (variable) {
            // bail out if variable name didn't match
            if (variable.key !== key) {
                return false;
            }

            // don't delete disabled variables
            if (variable.disabled) {
                lastDisabledVariable = variable;
                return false;
            }

            // delete all enabled variables
            return true;
        });

        // restore the reference with the last disabled variable
        if (lastDisabledVariable) {
            this.values.reference[key] = lastDisabledVariable;
        }

        // track the change if mutation tracking is enabled
        this._postman_enableTracking && this.mutations.track(MUTATIONS.UNSET, key);
    }
function (key) {
        var lastDisabledVariable;

        this.values.remove(function (variable) {
            // bail out if variable name didn't match
            if (variable.key !== key) {
                return false;
            }

            // don't delete disabled variables
            if (variable.disabled) {
                lastDisabledVariable = variable;
                return false;
            }

            // delete all enabled variables
            return true;
        });

        // restore the reference with the last disabled variable
        if (lastDisabledVariable) {
            this.values.reference[key] = lastDisabledVariable;
        }

        // track the change if mutation tracking is enabled
        this._postman_enableTracking && this.mutations.track(MUTATIONS.UNSET, key);
    }
function ( key ) { var lastDisabledVariable ; this . values . remove ( function ( variable ) { // bail out if variable name didn't match if ( variable . key !== key ) { return false ; } // don't delete disabled variables if ( variable . disabled ) { lastDisabledVariable = variable ; return false ; } // delete all enabled variables return true ; } ) ; // restore the reference with the last disabled variable if ( lastDisabledVariable ) { this . values . reference [ key ] = lastDisabledVariable ; } // track the change if mutation tracking is enabled this . _postman_enableTracking && this . mutations . track ( MUTATIONS . UNSET , key ) ; }
Removes the variable with the specified name.

@param {String} key
Removes the variable with the specified name .