function createBufferFromTypedArray(gl, typedArray, type, drawType) {
    if (typedArray instanceof WebGLBuffer) {
      return typedArray;
    }
    type = type || gl.ARRAY_BUFFER;
    var buffer = gl.createBuffer();
    setBufferFromTypedArray(gl, type, buffer, typedArray, drawType);
    return buffer;
  }
Given typed array creates a WebGLBuffer and copies the typed array
into it.

@param {WebGLRenderingContext} gl A WebGLRenderingContext
@param {ArrayBuffer|ArrayBufferView|WebGLBuffer} typedArray the typed array. Note: If a WebGLBuffer is passed in it will just be returned. No action will be taken
@param {number} [type] the GL bind type for the buffer. Default = `gl.ARRAY_BUFFER`.
@param {number} [drawType] the GL draw type for the buffer. Default = 'gl.STATIC_DRAW`.
@return {WebGLBuffer} the created WebGLBuffer
@memberOf module:twgl/attributes