Skip to content

Instantly share code, notes, and snippets.

@jackfranklin
Created April 12, 2014 22:44
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 jackfranklin/10560583 to your computer and use it in GitHub Desktop.
Save jackfranklin/10560583 to your computer and use it in GitHub Desktop.
ES6 Arrow Functions FTW.
module.exports = function(app) {
var lookup = {
'NOT_STARTED': 'not started',
'STARTED': 'started',
'BLOCKED': 'blocked'
};
app.filter('prettyState', () => (input) => lookup[input]);
app.filter('prettyState', function() {
return function(input) {
return lookup[input];
};
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment