shift73k/assets_old/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js.flow

11 lines
269 B
Text
Raw Normal View History

// @flow
import type { Placement } from '../enums';
const hash = { start: 'end', end: 'start' };
export default function getOppositeVariationPlacement(
placement: Placement
): Placement {
return (placement.replace(/start|end/g, matched => hash[matched]): any);
}