LT-275: Creating measure flow component layout and motion
This commit is contained in:
1 parent
82e374b1e3
commit
7fdfbf1c1a
26 files changed
+415
-26
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
|
||||
/**
|
||||
* Global Blaze UI helpers to development debugging
|
||||
*/
|
||||
|
||||
// Stop here if it's not development environment
|
||||
if (!Meteor.isDevelopment) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Debug some value on console
|
||||
Template.registerHelper('debug', (...values) => {
|
||||
console.debug(...values);
|
||||
});
|
||||
@@ -1,4 +1,7 @@
|
||||
import './blaze';
|
||||
import './data';
|
||||
import './logical';
|
||||
import './string';
|
||||
import './blaze.js';
|
||||
import './data.js';
|
||||
import './debug.js';
|
||||
import './logical.js';
|
||||
import './number.js';
|
||||
import './string.js';
|
||||
import './typing.js';
|
||||
@@ -17,7 +17,7 @@ Template.registerHelper('eq', (a, b) => {
|
||||
|
||||
// Check if two values are different
|
||||
Template.registerHelper('ne', (a, b) => {
|
||||
return a === b;
|
||||
return a !== b;
|
||||
});
|
||||
|
||||
// Check if the first value is greater than the second one
|
||||
@@ -67,8 +67,3 @@ Template.registerHelper('valueIf', (condition, valueIfTrue, valueIfFalse) => {
|
||||
|
||||
return valueIfFalse;
|
||||
});
|
||||
|
||||
// Check if the value is different from undefined
|
||||
Template.registerHelper('isDefined', value => {
|
||||
return typeof value !== 'undefined';
|
||||
});
|
||||
@@ -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;
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import { _ } from 'meteor/underscore';
|
||||
import { Template } from 'meteor/templating';
|
||||
|
||||
/**
|
||||
* Global Blaze UI helpers to work with Strings
|
||||
*/
|
||||
|
||||
// Check if the value's type is undefined
|
||||
Template.registerHelper('isUndefined', value => {
|
||||
return _.isUndefined(value);
|
||||
});
|
||||
|
||||
// Check if the value's type is object
|
||||
Template.registerHelper('isObject', value => {
|
||||
return _.isObject(value);
|
||||
});
|
||||
|
||||
// Check if the value is an array instance
|
||||
Template.registerHelper('isArray', value => {
|
||||
return _.isArray(value);
|
||||
});
|
||||
Reference in new issue
Block a user