function createProgramInfos(gl, programSpecs, programOptions) {
  programOptions = getProgramOptions(programOptions);
  function createProgramInfosForPrograms(gl, programs) {
    return Object.fromEntries(Object.entries(programs).map(function (_ref9) {
      var _ref10 = _slicedToArray(_ref9, 2),
        name = _ref10[0],
        program = _ref10[1];
      return [name, createProgramInfoFromProgram(gl, program)];
    }));
  }
  var origCallback = programOptions.callback;
  if (origCallback) {
    programOptions.callback = function (err, programs) {
      origCallback(err, err ? undefined : createProgramInfosForPrograms(gl, programs));
    };
  }
  var programs = createPrograms(gl, programSpecs, programOptions);
  if (origCallback || !programs) {
    return undefined;
  }
  return createProgramInfosForPrograms(gl, programs);
}
Creates multiple programInfos

Note: the reason this function exists is because the fastest way to create multiple
programs in WebGL is to create and compile all shaders and link all programs and only
afterwards check if they succeeded. In that way, giving all your shaders

@see {@link module:twgl.createProgramInfo}

Examples:

    const programInfos = twgl.createProgramInfos(gl, {
      lambert: [lambertVS, lambertFS],
      phong: [phongVS, phoneFS],
      particles: {
        shaders: [particlesVS, particlesFS],
        transformFeedbackVaryings: ['position', 'velocity'],
      },
    });

or

    const {lambert, phong, particles} = twgl.createProgramInfos(gl, {
      lambert: [lambertVS, lambertFS],
      phong: [phongVS, phoneFS],
      particles: {
        shaders: [particlesVS, particlesFS],
        transformFeedbackVaryings: ['position', 'velocity'],
      },
    });


@param {WebGLRenderingContext} gl the WebGLRenderingContext
@param {Object.<string, module:twgl.ProgramSpec>} programSpecs An object of ProgramSpecs, one per program.
@param {module:twgl.ProgramOptions} [programOptions] options to apply to all programs
@return {Object.<string, module:twgl.ProgramInfo>?} the created programInfos by name