function addEnums(gl) {
    var type = gl.constructor.name;

    if (!haveEnumsForType[type]) {
      for (var key in gl) {
        if (typeof gl[key] === 'number') {
          var existing = enums[gl[key]];
          enums[gl[key]] = existing ? "".concat(existing, " | ").concat(key) : key;
        }
      }

      haveEnumsForType[type] = true;
    }
  }
Gets a string for WebGL enum

Note: Several enums are the same. Without more
context (which function) it's impossible to always
give the correct enum. As it is, for matching values
it gives all enums. Checking the WebGL2RenderingContext
that means

     0     = ZERO | POINT | NONE | NO_ERROR
     1     = ONE | LINES | SYNC_FLUSH_COMMANDS_BIT
     32777 = BLEND_EQUATION_RGB | BLEND_EQUATION_RGB
     36662 = COPY_READ_BUFFER | COPY_READ_BUFFER_BINDING
     36663 = COPY_WRITE_BUFFER | COPY_WRITE_BUFFER_BINDING
     36006 = FRAMEBUFFER_BINDING | DRAW_FRAMEBUFFER_BINDING

It's also not useful for bits really unless you pass in individual bits.
In other words

    const bits = gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT;
    twgl.glEnumToString(gl, bits);  // not going to work

Note that some enums only exist on extensions. If you
want them to show up you need to pass the extension at least
once. For example

    const ext = gl.getExtension('WEBGL_compressed_texture_s3tc');
    if (ext) {
       twgl.glEnumToString(ext, 0);  // just prime the function

       ..later..

       const internalFormat = ext.COMPRESSED_RGB_S3TC_DXT1_EXT;
       console.log(twgl.glEnumToString(gl, internalFormat));

Notice I didn't have to pass the extension the second time. This means
you can have place that generically gets an enum for texture formats for example.
and as long as you primed the function with the extensions

If you're using `twgl.addExtensionsToContext` to enable your extensions
then twgl will automatically get the extension's enums.

@param {WebGLRenderingContext} gl A WebGLRenderingContext or any extension object
@param {number} value the value of the enum you want to look up.
@return {string} enum string or hex value
@memberOf module:twgl
@function glEnumToString