src/core/resources.js
function resources(data) {
    var items = [],
        fid = schedule.functor(id),
        favailable = schedule.functor(available),
        freserve = schedule.functor(isNotReservable);

    for(var i = 0, len = data.length; i < len; i++) {
      var resource = data[i],
          rId = fid.call(this, resource, i),
          rAvailable = favailable.call(this, resource, i),
          rReserve = freserve.call(this, resource, i);

      items.push({id: rId, available: rAvailable, isNotReservable: rReserve});
    }

    return items;
  }
function resources(data) {
    var items = [],
        fid = schedule.functor(id),
        favailable = schedule.functor(available),
        freserve = schedule.functor(isNotReservable);

    for(var i = 0, len = data.length; i < len; i++) {
      var resource = data[i],
          rId = fid.call(this, resource, i),
          rAvailable = favailable.call(this, resource, i),
          rReserve = freserve.call(this, resource, i);

      items.push({id: rId, available: rAvailable, isNotReservable: rReserve});
    }

    return items;
  }
function resources ( data ) { var items = [ ] , fid = schedule . functor ( id ) , favailable = schedule . functor ( available ) , freserve = schedule . functor ( isNotReservable ) ; for ( var i = 0 , len = data . length ; i < len ; i ++ ) { var resource = data [ i ] , rId = fid . call ( this , resource , i ) , rAvailable = favailable . call ( this , resource , i ) , rReserve = freserve . call ( this , resource , i ) ; items . push ( { id : rId , available : rAvailable , isNotReservable : rReserve } ) ; } return items ; }
Takes an array of objects and returns an array of schedule resource objects.
Takes an array of objects and returns an array of schedule resource objects .