Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/util-body-length-node

Package Overview
Dependencies
Maintainers
4
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/util-body-length-node - npm Package Compare versions

Comparing version 0.1.0-preview.2 to 0.1.0-preview.3

CHANGELOG.md

8

build/index.js

@@ -8,13 +8,13 @@ "use strict";

}
if (typeof body === 'string') {
if (typeof body === "string") {
return Buffer.from(body).length;
}
else if (typeof body.byteLength === 'number') {
else if (typeof body.byteLength === "number") {
// handles Uint8Array, ArrayBuffer, Buffer, and ArrayBufferView
return body.byteLength;
}
else if (typeof body.size === 'number') {
else if (typeof body.size === "number") {
return body.size;
}
else if (typeof body.path === 'string') {
else if (typeof body.path === "string") {
// handles fs readable streams

@@ -21,0 +21,0 @@ return fs_1.lstatSync(body.path).size;

{
"name": "@aws-sdk/util-body-length-node",
"description": "Determines the length of a request body in node.js",
"version": "0.1.0-preview.2",
"scripts": {
"prepublishOnly": "tsc",
"pretest": "tsc -p tsconfig.test.json",
"test": "jest"
},
"devDependencies": {
"@types/jest": "^20.0.4",
"@types/node": "^8.10.29",
"jest": "^20.0.4",
"typescript": "^3.0.0"
},
"main": "./build/index.js",
"types": "./build/index.d.ts",
"author": {
"name": "AWS SDK for JavaScript Team",
"email": "aws-sdk-js@amazon.com",
"url": "https://aws.amazon.com/javascript/"
},
"license": "Apache-2.0",
"dependencies": {
"tslib": "^1.8.0"
}
"name": "@aws-sdk/util-body-length-node",
"description": "Determines the length of a request body in node.js",
"version": "0.1.0-preview.3",
"scripts": {
"prepublishOnly": "tsc",
"pretest": "tsc -p tsconfig.test.json",
"test": "jest"
},
"devDependencies": {
"@types/jest": "^24.0.12",
"@types/node": "^10.0.0",
"jest": "^24.7.1",
"typescript": "~3.4.0"
},
"main": "./build/index.js",
"types": "./build/index.d.ts",
"author": {
"name": "AWS SDK for JavaScript Team",
"email": "",
"url": "https://aws.amazon.com/javascript/"
},
"license": "Apache-2.0",
"dependencies": {
"tslib": "^1.8.0"
}
}

@@ -1,3 +0,6 @@

# util-body-length-node
# @aws-sdk/util-body-length-node
Determines the length of a request body in node.js
Determines the length of a request body in node.js
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/util-body-length-node/preview.svg)](https://www.npmjs.com/package/@aws-sdk/util-body-length-node)
[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/util-body-length-node.svg)](https://www.npmjs.com/package/@aws-sdk/util-body-length-node)
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"strict": true,
"sourceMap": true,
"downlevelIteration": true,
"lib": [
"es5",
"es2015.promise",
"es2015.collection",
"es2015.iterable",
"es2015.symbol.wellknown"
],
"rootDir": "./src",
"outDir": "./build",
"importHelpers": true,
"noEmitHelpers": true
}
}
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"strict": true,
"sourceMap": true,
"downlevelIteration": true,
"lib": [
"es5",
"es2015.promise",
"es2015.collection",
"es2015.iterable",
"es2015.symbol.wellknown"
],
"rootDir": "./src",
"outDir": "./build",
"importHelpers": true,
"noEmitHelpers": true
}
}

Sorry, the diff of this file is not supported yet

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