mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 20:42:43 +00:00
Remove switch statement
This commit is contained in:
@@ -3,13 +3,12 @@ const dedent = require('dedent-tabs').default;
|
||||
|
||||
module.exports = {
|
||||
edge : (side = 'bottom')=>{
|
||||
let rotation;
|
||||
switch (side){
|
||||
case 'bottom': rotation = 0; break;
|
||||
case 'top' : rotation = 180; break;
|
||||
case 'left' : rotation = 90; break;
|
||||
case 'right' : rotation = 270; break;
|
||||
}
|
||||
const rotation = {
|
||||
'bottom' : 0,
|
||||
'top' : 180,
|
||||
'left' : 90,
|
||||
'right' : 270
|
||||
}[side];
|
||||
return dedent`
|
||||
{{imageMaskEdge${_.random(1, 8)},--offset:0cm,--rotation:${rotation};
|
||||
{height:100%}
|
||||
|
||||
Reference in New Issue
Block a user