all files / src/ helpers.ts

100% Statements 10/10
100% Branches 2/2
100% Functions 1/1
100% Lines 10/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15    16× 16× 17×   16× 16× 16× 14×   16×  
import { Http } from '@angular/http';
import { Restangular } from './restangular';
 
export function RestangularFactory(http: Http, customFactory?: Function, ...deps: Array<any>): Restangular {
  const restangular: Restangular = new Restangular(http);
 
  deps = [].concat(deps);
 
  if (customFactory) {
    customFactory(restangular.config, ...deps);
  }
 
  return restangular;
}