@middy/core
Advanced tools
Comparing version 5.3.0 to 5.3.1
26
index.js
@@ -71,12 +71,8 @@ /* global awslambda */ | ||
} else if (typeof handlerBody === 'string') { | ||
function * iterator (input) { | ||
const size = 16384 // 16 * 1024 // Node.js default | ||
let position = 0 | ||
const length = input.length | ||
while (position < length) { | ||
yield input.substring(position, position + size) | ||
position += size | ||
} | ||
} | ||
handlerStream = Readable.from(iterator(handlerBody)) | ||
// #1189 | ||
handlerStream = Readable.from( | ||
handlerBody.length < stringIteratorSize | ||
? handlerBody | ||
: stringIterator(handlerBody) | ||
) | ||
} | ||
@@ -133,2 +129,12 @@ | ||
const stringIteratorSize = 16384 // 16 * 1024 // Node.js default | ||
function * stringIterator (input) { | ||
let position = 0 | ||
const length = input.length | ||
while (position < length) { | ||
yield input.substring(position, position + stringIteratorSize) | ||
position += stringIteratorSize | ||
} | ||
} | ||
// shared AbortController, because it's slow | ||
@@ -135,0 +141,0 @@ let handlerAbort = new AbortController() |
{ | ||
"name": "@middy/core", | ||
"version": "5.3.0", | ||
"version": "5.3.1", | ||
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (core package)", | ||
@@ -63,3 +63,3 @@ "type": "module", | ||
}, | ||
"gitHead": "5a6e7eddde70120080d5564b1b591eb8c60d210b", | ||
"gitHead": "d25628bf7ebf0c4f00ed2e789d0b3edae2be4dae", | ||
"dependencies": { | ||
@@ -66,0 +66,0 @@ "@datastream/core": "0.0.35" |
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
18388
388