Welcome to mirror list, hosted at ThFree Co, Russian Federation.

getOppositeVariationPlacement.js.flow « utils « lib « package « popperjs - github.com/gohugoio/hugo-mod-jslibs-dist.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2887948de2e2631596d1ddf9c7db5087378d4205 (plain)
1
2
3
4
5
6
7
8
9
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);
}