lib/utils.js
function(flags, checkFlags, value) {
        [].concat(checkFlags || []).forEach((function(flag, i) {
            if (i == value) {
                this.ensureFlag(flags, flag);
            } else {
                this.removeFlag(flags, flag);
            }
        }.bind(this)));
    }
function(flags, checkFlags, value) {
        [].concat(checkFlags || []).forEach((function(flag, i) {
            if (i == value) {
                this.ensureFlag(flags, flag);
            } else {
                this.removeFlag(flags, flag);
            }
        }.bind(this)));
    }
function ( flags , checkFlags , value ) { [ ] . concat ( checkFlags || [ ] ) . forEach ( ( function ( flag , i ) { if ( i == value ) { this . ensureFlag ( flags , flag ) ; } else { this . removeFlag ( flags , flag ) ; } } . bind ( this ) ) ) ; }
Toggles listed flags. Flags with `value` index will be turned on,
other listed fields are removed from the array

@param {Array} flags List of flags
@param {Array} checkFlags Flags to toggle
@param {Number} value Flag from checkFlags array with value index is toggled
Toggles listed flags . Flags with value index will be turned on other listed fields are removed from the array