@smithy/util-base64
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -14,3 +14,7 @@ "use strict"; | ||
} | ||
if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { | ||
const isArrayLike = typeof input === "object" && typeof input.length === "number"; | ||
const isUint8Array = typeof input === "object" && | ||
typeof input.byteOffset === "number" && | ||
typeof input.byteLength === "number"; | ||
if (!isArrayLike && !isUint8Array) { | ||
throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); | ||
@@ -17,0 +21,0 @@ } |
@@ -11,3 +11,7 @@ import { fromUtf8 } from "@smithy/util-utf8"; | ||
} | ||
if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { | ||
const isArrayLike = typeof input === "object" && typeof input.length === "number"; | ||
const isUint8Array = typeof input === "object" && | ||
typeof input.byteOffset === "number" && | ||
typeof input.byteLength === "number"; | ||
if (!isArrayLike && !isUint8Array) { | ||
throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); | ||
@@ -14,0 +18,0 @@ } |
{ | ||
"name": "@smithy/util-base64", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "A Base64 <-> UInt8Array converter", | ||
@@ -5,0 +5,0 @@ "main": "./dist-cjs/index.js", |
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
29153
381