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

10 lines
269 B
Text

// @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);
}