@aws-sdk/util-base64-node
Advanced tools
Comparing version 3.186.0 to 3.188.0
@@ -6,2 +6,10 @@ # Change Log | ||
# [3.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13) | ||
**Note:** Version bump only for package @aws-sdk/util-base64-node | ||
# [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06) | ||
@@ -8,0 +16,0 @@ |
import { fromArrayBuffer, fromString } from "@aws-sdk/util-buffer-from"; | ||
var BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; | ||
const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; | ||
export function fromBase64(input) { | ||
if ((input.length * 3) % 4 !== 0) { | ||
throw new TypeError("Incorrect padding on base64 string."); | ||
throw new TypeError(`Incorrect padding on base64 string.`); | ||
} | ||
if (!BASE64_REGEX.exec(input)) { | ||
throw new TypeError("Invalid base64 string."); | ||
throw new TypeError(`Invalid base64 string.`); | ||
} | ||
var buffer = fromString(input, "base64"); | ||
const buffer = fromString(input, "base64"); | ||
return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); | ||
@@ -12,0 +12,0 @@ } |
{ | ||
"name": "@aws-sdk/util-base64-node", | ||
"version": "3.186.0", | ||
"version": "3.188.0", | ||
"description": "A Node.JS Base64 <-> UInt8Array converter", | ||
@@ -23,3 +23,3 @@ "main": "./dist-cjs/index.js", | ||
"dependencies": { | ||
"@aws-sdk/util-buffer-from": "3.186.0", | ||
"@aws-sdk/util-buffer-from": "3.188.0", | ||
"tslib": "^2.3.1" | ||
@@ -26,0 +26,0 @@ }, |
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
35141
+ Added@aws-sdk/is-array-buffer@3.188.0(transitive)
+ Added@aws-sdk/util-buffer-from@3.188.0(transitive)
- Removed@aws-sdk/is-array-buffer@3.186.0(transitive)
- Removed@aws-sdk/util-buffer-from@3.186.0(transitive)