index.js
function extendingEndpoints() {
  var segments = Array.prototype.slice.call(arguments, 0);
  return function () {
    var path = '';
    segments.forEach(function (pathSegment) {
      path = path + pathSegment;
      createEndpointFromPath(path);
      console.log('  registered path %s', path);
    });
  }
}
function extendingEndpoints() {
  var segments = Array.prototype.slice.call(arguments, 0);
  return function () {
    var path = '';
    segments.forEach(function (pathSegment) {
      path = path + pathSegment;
      createEndpointFromPath(path);
      console.log('  registered path %s', path);
    });
  }
}
function extendingEndpoints ( ) { var segments = Array . prototype . slice . call ( arguments , 0 ) ; return function ( ) { var path = '' ; segments . forEach ( function ( pathSegment ) { path = path + pathSegment ; createEndpointFromPath ( path ) ; console . log ( '  registered path %s' , path ) ; } ) ; } }
Create a thunk that will build up endpoints from an ordered set of path
segments, registering the endpoints at all stages along the way.

Each endpoint must have a corresponding JSON file in the mocks directory.
Create a thunk that will build up endpoints from an ordered set of path segments registering the endpoints at all stages along the way .