nire0510
2/29/2016 - 11:23 AM

Ember helper: generates range of numbers

Ember helper: generates range of numbers

import Ember from 'ember';

export function range(params/*, hash*/) {
  var arrRange = [];

  for (var i = params[0]; i <= params[1]; i++) {
    arrRange.push(i);
  }

  return arrRange;
}

export default Ember.Helper.helper(range);