Socket
Socket
Sign inDemoInstall

@aws-sdk/util-buffer-from

Package Overview
Dependencies
Maintainers
5
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/util-buffer-from - npm Package Compare versions

Comparing version 3.170.0 to 3.183.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
**Note:** Version bump only for package @aws-sdk/util-buffer-from
# [3.170.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.169.0...v3.170.0) (2022-09-13)

@@ -8,0 +16,0 @@

10

dist-es/index.js
import { isArrayBuffer } from "@aws-sdk/is-array-buffer";
import { Buffer } from "buffer";
export var fromArrayBuffer = function (input, offset, length) {
if (offset === void 0) { offset = 0; }
if (length === void 0) { length = input.byteLength - offset; }
export const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => {
if (!isArrayBuffer(input)) {
throw new TypeError("The \"input\" argument must be ArrayBuffer. Received type ".concat(typeof input, " (").concat(input, ")"));
throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
}
return Buffer.from(input, offset, length);
};
export var fromString = function (input, encoding) {
export const fromString = (input, encoding) => {
if (typeof input !== "string") {
throw new TypeError("The \"input\" argument must be of type string. Received type ".concat(typeof input, " (").concat(input, ")"));
throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
}
return encoding ? Buffer.from(input, encoding) : Buffer.from(input);
};

4

package.json
{
"name": "@aws-sdk/util-buffer-from",
"version": "3.170.0",
"version": "3.183.0",
"scripts": {

@@ -20,3 +20,3 @@ "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",

"dependencies": {
"@aws-sdk/is-array-buffer": "3.170.0",
"@aws-sdk/is-array-buffer": "3.183.0",
"tslib": "^2.3.1"

@@ -23,0 +23,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc