Skip to content

Instantly share code, notes, and snippets.

@pablohpsilva
Last active July 15, 2016 22:38
Show Gist options
  • Save pablohpsilva/4a51f52cbfc62fa0695b17c2068718ae to your computer and use it in GitHub Desktop.
Save pablohpsilva/4a51f52cbfc62fa0695b17c2068718ae to your computer and use it in GitHub Desktop.
Vue.filter('formatResult', function(value, functionArray){
if (functionArray) {
let rList = value,
aux = [];
for (let i = 0, total = functionArray.length; i < total; i++) {
aux = [rList].concat((functionArray[i]).args);
rList = (functionArray[i]).func.apply(null, aux);
}
return rList;
}
return value;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment