src/page_assembler.js
function assemble( page ) {
      if( typeof page !== 'object' ) {
         return Promise.reject( new Error(
            'PageAssembler.assemble must be called with a page artifact (object)'
         ) );
      }
      removeDisabledItems( page );
      return loadPageRecursively( page, page.name, [] );
   }
function assemble( page ) {
      if( typeof page !== 'object' ) {
         return Promise.reject( new Error(
            'PageAssembler.assemble must be called with a page artifact (object)'
         ) );
      }
      removeDisabledItems( page );
      return loadPageRecursively( page, page.name, [] );
   }
function assemble ( page ) { if ( typeof page !== 'object' ) { return Promise . reject ( new Error ( 'PageAssembler.assemble must be called with a page artifact (object)' ) ) ; } removeDisabledItems ( page ) ; return loadPageRecursively ( page , page . name , [ ] ) ; }
Loads a page specification and resolves all extension and compositions. The result is a page were all
referenced page fragments are merged in to one JavaScript object. Returns a promise that is either
resolved with the constructed page or rejected with a JavaScript `Error` instance.

@param {String} page
the page to load. Usually a path relative to the base url, with the `.json` suffix omitted

@return {Promise}
the result promise
Loads a page specification and resolves all extension and compositions . The result is a page were all referenced page fragments are merged in to one JavaScript object . Returns a promise that is either resolved with the constructed page or rejected with a JavaScript Error instance .