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

@middy/util

Package Overview
Dependencies
Maintainers
3
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@middy/util - npm Package Compare versions

Comparing version 2.0.0-alpha.0 to 2.0.0-alpha.1

14

index.js

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

"use strict";
const {

@@ -57,3 +59,3 @@ Agent

const canPrefetch = options => {
return !options?.awsClientAssumeRole && !options?.disablePrefetch;
return !(options !== null && options !== void 0 && options.awsClientAssumeRole) && !(options !== null && options !== void 0 && options.disablePrefetch);
}; // Internal Context

@@ -81,2 +83,4 @@

for (const internalKey of values) {
var _valuePromise;
// 'internal.key.sub_value' -> { [key]: internal.key.sub_value }

@@ -87,7 +91,7 @@ const pathOptionKey = internalKey.split('.');

if (typeof valuePromise?.then !== 'function') {
if (typeof ((_valuePromise = valuePromise) === null || _valuePromise === void 0 ? void 0 : _valuePromise.then) !== 'function') {
valuePromise = Promise.resolve(valuePromise);
}
promises.push(valuePromise.then(value => pathOptionKey.reduce((p, c) => p?.[c], value)));
promises.push(valuePromise.then(value => pathOptionKey.reduce((p, c) => p === null || p === void 0 ? void 0 : p[c], value)));
} // ensure promise has resolved by the time it's needed

@@ -136,3 +140,5 @@ // If one of the promises throws it will bubble up to @middy/core

const clearCache = (keys = null) => {
keys = keys ?? Object.keys(cache);
var _keys;
keys = (_keys = keys) !== null && _keys !== void 0 ? _keys : Object.keys(cache);
if (!Array.isArray(keys)) keys = [keys];

@@ -139,0 +145,0 @@

{
"name": "@middy/util",
"version": "2.0.0-alpha.0",
"version": "2.0.0-alpha.1",
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (util package)",

@@ -15,2 +15,3 @@ "type": "commonjs",

"types": "index.d.ts",
"files": [],
"scripts": {

@@ -45,3 +46,3 @@ "test": "npm run test:typings && npm run test:unit",

"homepage": "https://github.com/middyjs/middy#readme",
"gitHead": "e047c0d3db00aa11b39f2d3e193458ea021a58a0"
"gitHead": "f8b0f418477cdbff47da693963bf1ea918b39d04"
}
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