import { helper } from 'ember-helper';

export function castUnobservableArray([array]) {
  if (array) {
    return {
      forEach(cb) {
        array.forEach(cb);
      }
    };
  }
  return { forEach() {} };
}

export default helper(castUnobservableArray);
