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

getOppositeVariationPlacement.js « utils « lib « package « popperjs - github.com/gohugoio/hugo-mod-jslibs-dist.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 379d0718a54b550ff06b4d9cee802299979cf9e9 (plain)
1
2
3
4
5
6
7
8
9
var hash = {
  start: 'end',
  end: 'start'
};
export default function getOppositeVariationPlacement(placement) {
  return placement.replace(/start|end/g, function (matched) {
    return hash[matched];
  });
}