function getPackStateOption(gl, options, property, pname) {
  var v = options[property];
  return _defineProperty({}, property, v === undefined ? gl.getParameter(pname) : v);
}
returns the property if set or the corresponding state if undefined
@param {WebGLRenderingContext} gl the WebGLRenderingContext
@param {module:twgl.TextureOptions} options
@param {string} property the name of the property to copy
@param {number} pname
@return {module:twgl.TextureOptions}