Skip to content

Instantly share code, notes, and snippets.

@andreybleme
Last active November 19, 2016 17:19
Show Gist options
  • Save andreybleme/8986b787fe0c8a6067f3ffde40b90bfa to your computer and use it in GitHub Desktop.
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.
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