Last active
November 19, 2016 17:19
-
-
Save andreybleme/8986b787fe0c8a6067f3ffde40b90bfa to your computer and use it in GitHub Desktop.
Exemplo de utilização do paradigma funcional em um filter do Vue 2.0.
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
computed: { | |
filteredThings () { | |
return this.things | |
.filter(contains(this.foo)) | |
.sort(by(thing => thing.bar)) | |
.slice(0, 10) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment