code: function getEntries(config) {
      assert_usage(config && config.entry);
      if( config.entry.constructor===String ) {
          return {main: [config.entry]};
      }
      if( config.entry.constructor===Array ) {
          return {main: [...config.entry]};
      }
      if( config.entry.constructor===Object ) {
          const entries = {};
          Object.entries(config.entry)
          .forEach(([entryName, entryFiles]) => {
              if( entryFiles && entryFiles.constructor===Array ) {
                  entries[entryName] = [...entryFiles];
                  return;
              }
              if( entryFiles && entryFiles.constructor===String ) {
                  entries[entryName] = [entryFiles];
                  return;
              }
              assert_usage(false, entryFiles, entryName);
          });
          return entries;
      }
      assert_usage(false);
  }
docs: Webpack's normalizing code at webpack/lib/EntryOptionPlugin.js