📄 getOppositeVariationPlacement.js.flow
/home/palash/git/site/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js.flow
Language: flow • Lines: 10
// @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);
}