Skip to content

Instantly share code, notes, and snippets.

@nullthoughts
Created August 3, 2018 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nullthoughts/f2673b575de7fb5ec7d65e39158c139f to your computer and use it in GitHub Desktop.
Save nullthoughts/f2673b575de7fb5ec7d65e39158c139f to your computer and use it in GitHub Desktop.
Vue Implode Method (Join on Array Key)
implode(array, key = null, glue = ', ') {
if(key) {
array = array.map(function(element) {
return element[key];
})
}
return array.join(glue);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment