Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Filters For Variable Output #4
Added filters for variable output. Handy for transcoding raw data into something useful for display. This is definitely just a start, as they are relatively easy to implement. It'd be great to also look into a way to add custom filters.
Also added node unit as a devDependency and wrote simple unit tests for all filters.
Forgot to note: Also added pre-commit and post-merge hooks that will, once you've run
added a commit
this pull request
Aug 7, 2011
Merged this one. Great job.
P.S. It's good to do this when you're creating the compiled code.
output = '__filters.' + matches + '(' + variable + ', ' + matches + ')';
output = '__filters["' + matches + '"](' + variable + ', ' + matches + ')';
Since we already have the filters predefined in the module and dot-based property lookup is faster.