base64-arraybuffer
Advanced tools
Comparing version 0.1.0 to 0.1.2
@@ -0,0 +0,0 @@ module.exports = function(grunt) { |
@@ -13,9 +13,9 @@ /* | ||
var bytes = new Uint8Array(arraybuffer), | ||
i, len = bytes.buffer.byteLength, base64 = ""; | ||
i, len = bytes.length, base64 = ""; | ||
for (i = 0; i < len; i+=3) { | ||
base64 += chars[bytes.buffer[i] >> 2]; | ||
base64 += chars[((bytes.buffer[i] & 3) << 4) | (bytes.buffer[i + 1] >> 4)]; | ||
base64 += chars[((bytes.buffer[i + 1] & 15) << 2) | (bytes.buffer[i + 2] >> 6)]; | ||
base64 += chars[bytes.buffer[i + 2] & 63]; | ||
base64 += chars[bytes[i] >> 2]; | ||
base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)]; | ||
base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)]; | ||
base64 += chars[bytes[i + 2] & 63]; | ||
} | ||
@@ -60,2 +60,2 @@ | ||
}; | ||
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); | ||
})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"); |
{ | ||
"name": "base64-arraybuffer", | ||
"description": "Encode/decode base64 data into ArrayBuffers", | ||
"version": "0.1.0", | ||
"version": "0.1.2", | ||
"homepage": "https://github.com/niklasvh/base64-arraybuffer", | ||
@@ -35,2 +35,2 @@ "author": { | ||
"keywords": [] | ||
} | ||
} |
# base64-arraybuffer | ||
[![Build Status](https://travis-ci.org/niklasvh/base64-arraybuffer.png)](https://travis-ci.org/niklasvh/base64-arraybuffer) | ||
Encode/decode base64 data into ArrayBuffers | ||
@@ -15,6 +17,8 @@ | ||
## Release History | ||
0.1.0 - Initial version, basic decode/encode base64 to and from ArrayBuffer | ||
- 0.1.2 - Fix old format of typed arrays | ||
- 0.1.0 - Initial version, basic decode/encode base64 to and from ArrayBuffer | ||
## License | ||
Copyright (c) 2012 Niklas von Hertzen | ||
Licensed under the MIT license. |
@@ -0,0 +0,0 @@ (function(){ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8981
147
24