You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
269 B

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