This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template lang="pug"> | |
div.component(ref="elRef" :style="{ filter: `saturate(${saturation}) brightness(${brightness})` }") | |
div | |
div Brightness: {{brightness}} | |
div Saturation: {{saturation}} | |
div Width: {{width}} | |
div Height: {{height}} | |
div X: {{x}} | |
div Y: {{y}} | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Monad is a container with some value and ability to perform mapping operation | |
* on that value while returning result wrapped in a new Monad | |
*/ | |
const Monad = value => ({ | |
// Return mapped (transformed via passed func) value | |
flatMap: func => func(value), | |
// Return mapped (transformed via passed func) value wrapped in new Monad |