mirror of
https://github.com/apache/cordova-android.git
synced 2026-04-23 00:00:09 +08:00
updated cordova-common dependnecy to 1.1.0
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
/** Native method references. */
|
||||
var ArrayBuffer = global.ArrayBuffer,
|
||||
Uint8Array = global.Uint8Array;
|
||||
|
||||
/**
|
||||
* Creates a clone of the given array buffer.
|
||||
*
|
||||
* @private
|
||||
* @param {ArrayBuffer} buffer The array buffer to clone.
|
||||
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
||||
*/
|
||||
function bufferClone(buffer) {
|
||||
var result = new ArrayBuffer(buffer.byteLength),
|
||||
view = new Uint8Array(result);
|
||||
|
||||
view.set(new Uint8Array(buffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
module.exports = bufferClone;
|
||||
Reference in New Issue
Block a user