LT-275: Creating measure flow component common section
This commit is contained in:
1 parent
9a8eaff560
commit
bbb7dad905
60 files changed
+391
-156
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { Template } from 'meteor/templating';
|
||||
|
||||
/**
|
||||
* Global Blaze UI helpers to work with numeric operations
|
||||
*/
|
||||
|
||||
// Sum all the given numbers
|
||||
Template.registerHelper('sum', (...values) => {
|
||||
let result = 0;
|
||||
_.each(_.initial(values, 1), value => (result += (value | 0)));
|
||||
return result;
|
||||
});
|
||||
Reference in new issue
Block a user