all files / popper/utils/ getOppositeVariation.js

80% Statements 4/5
75% Branches 3/4
100% Functions 1/1
80% Lines 4/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16                       
/**
 * Get the opposite placement variation of the given one/
 * @method
 * @memberof Popper.Utils
 * @argument {String} placement variation
 * @returns {String} flipped placement variation
 */
export default function getOppositeVariation(variation) {
    if (variation === 'end') {
        return 'start';
    } else Eif (variation === 'start') {
        return 'end';
    }
    return variation;
}