import Ember from 'ember';

export function ifOperator([value1, operator, value2]) {
	switch(operator) {
		case '>':
			return value1 > value2;
		case '>=':
			return value1 >= value2;
		case '<=':
			return value1 <= value2;
		case '<':
			return value1 < value2;
		default:
			break;
	}
	return;
}

export default Ember.Helper.helper(ifOperator);
