docs: function createDuplicateModuleChecker( warn ) {
     const knownModules = {};
  
     return {
        register( moduleName, filename ) {
           if( !( moduleName in knownModules ) ) {
              knownModules[ moduleName ] = [];
           }
           knownModules[ moduleName ].push( filename );
        },
        check() {
           Object.keys( knownModules ).forEach( moduleName => {
              const files = knownModules[ moduleName ];
              if( files.length >= 2 ) {
                 warn( `Duplicate definition of module ${moduleName}. Found in these files:\n` +
                    `   - ${files.join( '\n   - ' )}` );
              }
           } );
        }
     };
  }