code: function createSampler(gl, options) {
    const sampler = gl.createSampler();
    setSamplerParameters(gl, sampler, options);
    return sampler;
  }
docs: Creates a new sampler object and sets parameters.
  
  Example:
  
  const sampler = twgl.createSampler(gl, {
  minMag: gl.NEAREST,         // sets both TEXTURE_MIN_FILTER and TEXTURE_MAG_FILTER
  wrap: gl.CLAMP_TO_NEAREST,  // sets both TEXTURE_WRAP_S and TEXTURE_WRAP_T and TEXTURE_WRAP_R
  });
  
  @param {WebGLRenderingContext} gl the WebGLRenderingContext
  @param {Object.<string,module:twgl.TextureOptions>} options A object of TextureOptions one per sampler.
  @return {Object.<string,WebGLSampler>} the created samplers by name
  @private