@aws-crypto/util
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -8,3 +8,3 @@ "use strict"; | ||
// Quick polyfill | ||
var fromUtf8 = Buffer && Buffer.from | ||
var fromUtf8 = typeof Buffer !== "undefined" && Buffer.from | ||
? function (input) { return Buffer.from(input, "utf8"); } | ||
@@ -25,2 +25,2 @@ : util_utf8_browser_1.fromUtf8; | ||
exports.convertToBuffer = convertToBuffer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udmVydFRvQnVmZmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbnZlcnRUb0J1ZmZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0VBQW9FO0FBQ3BFLHNDQUFzQzs7O0FBR3RDLGdFQUF5RTtBQUV6RSxpQkFBaUI7QUFDakIsSUFBTSxRQUFRLEdBQ1osTUFBTSxJQUFJLE1BQU0sQ0FBQyxJQUFJO0lBQ25CLENBQUMsQ0FBQyxVQUFDLEtBQWEsSUFBSyxPQUFBLE1BQU0sQ0FBQyxJQUFJLENBQUMsS0FBSyxFQUFFLE1BQU0sQ0FBQyxFQUExQixDQUEwQjtJQUMvQyxDQUFDLENBQUMsNEJBQWUsQ0FBQztBQUV0QixTQUFnQixlQUFlLENBQUMsSUFBZ0I7SUFDOUMsOEJBQThCO0lBQzlCLElBQUksSUFBSSxZQUFZLFVBQVU7UUFBRSxPQUFPLElBQUksQ0FBQztJQUU1QyxJQUFJLE9BQU8sSUFBSSxLQUFLLFFBQVEsRUFBRTtRQUM1QixPQUFPLFFBQVEsQ0FBQyxJQUFJLENBQUMsQ0FBQztLQUN2QjtJQUVELElBQUksV0FBVyxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsRUFBRTtRQUM1QixPQUFPLElBQUksVUFBVSxDQUNuQixJQUFJLENBQUMsTUFBTSxFQUNYLElBQUksQ0FBQyxVQUFV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WV3KGRhdGEpKSB7XG4gICAgcmV0dXJuIG5ldyBVaW50OEFycmF5KFxuICAgICAgZGF0YS5idWZmZXIsXG4gICAgICBkYXRhLmJ5dGVPZmZzZXQsXG4gICAgICBkYXRhLmJ5dGVMZW5ndGggLyBVaW50OEFycmF5LkJZVEVTX1BFUl9FTEVNRU5UXG4gICAgKTtcbiAgfVxuXG4gIHJldHVybiBuZXcgVWludDhBcnJheShkYXRhKTtcbn1cbiJdfQ== |
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.2.1](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.2.0...v1.2.1) (2021-09-17) | ||
### Bug Fixes | ||
* better pollyfill check for Buffer ([#217](https://github.com/aws/aws-sdk-js-crypto-helpers/issues/217)) ([bc97da2](https://github.com/aws/aws-sdk-js-crypto-helpers/commit/bc97da29aaf473943e4407c9a29cc30f74f15723)) | ||
# [1.2.0](https://github.com/aws/aws-sdk-js-crypto-helpers/compare/v1.1.1...v1.2.0) (2021-09-17) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@aws-crypto/util", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"scripts": { | ||
@@ -29,3 +29,3 @@ "prepublishOnly": "tsc", | ||
}, | ||
"gitHead": "af2e64c8753bdf1d053d98c9a211ffa28410199b" | ||
"gitHead": "db0aff5cdb9baa9ab30364df1862647512d548b7" | ||
} |
@@ -9,3 +9,3 @@ // Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | ||
const fromUtf8 = | ||
Buffer && Buffer.from | ||
typeof Buffer !== "undefined" && Buffer.from | ||
? (input: string) => Buffer.from(input, "utf8") | ||
@@ -12,0 +12,0 @@ : fromUtf8Browser; |
@@ -1,1 +0,1 @@ | ||
{"list":[],"secret":"3bc8bb8a9fdfa6e9558c2ecef58efa0b7bab853ddbffde575df05e08b2cb08e4"} | ||
{"list":[],"secret":"a12970d56aa9bcc7470ac108c232890b73265a892bbfbd897a327957694cc50d"} |
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
23218