🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@aws-lambda-powertools/commons

Package Overview
Dependencies
Maintainers
3
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-lambda-powertools/commons - npm Package Compare versions

Comparing version

to
2.6.0

2

lib/cjs/awsSdkUtils.js

@@ -91,3 +91,3 @@ "use strict";

else {
throw new Error(`The client provided does not match the expected interface`);
throw new Error('The client provided does not match the expected interface');
}

@@ -94,0 +94,0 @@ }

@@ -100,6 +100,6 @@ "use strict";

const xRayTraceData = {};
xRayTraceEnv.split(';').forEach((field) => {
for (const field of xRayTraceEnv.split(';')) {
const [key, value] = field.split('=');
xRayTraceData[key] = value;
});
}
return xRayTraceData;

@@ -106,0 +106,0 @@ }

@@ -27,6 +27,6 @@ "use strict";

if ((input.length * 3) % 4 !== 0) {
throw new TypeError(`Incorrect padding on base64 string.`);
throw new TypeError('Incorrect padding on base64 string.');
}
if (!BASE64_REGEX.exec(input)) {
throw new TypeError(`Invalid base64 string.`);
throw new TypeError('Invalid base64 string.');
}

@@ -33,0 +33,0 @@ const buffer = encoding ? Buffer.from(input, encoding) : Buffer.from(input);

@@ -102,17 +102,15 @@ "use strict";

}
else if (isNumber(value)) {
if (isNumber(value)) {
return value !== 0;
}
else if (typeof value === 'boolean') {
if (typeof value === 'boolean') {
return value;
}
else if (Array.isArray(value)) {
if (Array.isArray(value)) {
return value.length > 0;
}
else if (isRecord(value)) {
if (isRecord(value)) {
return Object.keys(value).length > 0;
}
else {
return false;
}
return false;
};

@@ -177,20 +175,18 @@ exports.isTruthy = isTruthy;

}
else if (isRecord(value)) {
if (isRecord(value)) {
return 'object';
}
else if (isString(value)) {
if (isString(value)) {
return 'string';
}
else if (isNumber(value)) {
if (isNumber(value)) {
return 'number';
}
else if (typeof value === 'boolean') {
if (typeof value === 'boolean') {
return 'boolean';
}
else if (isNull(value)) {
if (isNull(value)) {
return 'null';
}
else {
return 'unknown';
}
return 'unknown';
};

@@ -197,0 +193,0 @@ exports.getType = getType;

@@ -1,2 +0,2 @@

export declare const PT_VERSION = "2.5.0";
export declare const PT_VERSION = "2.6.0";
//# sourceMappingURL=version.d.ts.map

@@ -5,2 +5,2 @@ "use strict";

// this file is auto generated, do not modify
exports.PT_VERSION = '2.5.0';
exports.PT_VERSION = '2.6.0';

@@ -86,3 +86,3 @@ import { PT_VERSION } from './version.js';

else {
throw new Error(`The client provided does not match the expected interface`);
throw new Error('The client provided does not match the expected interface');
}

@@ -89,0 +89,0 @@ }

@@ -97,6 +97,6 @@ /**

const xRayTraceData = {};
xRayTraceEnv.split(';').forEach((field) => {
for (const field of xRayTraceEnv.split(';')) {
const [key, value] = field.split('=');
xRayTraceData[key] = value;
});
}
return xRayTraceData;

@@ -103,0 +103,0 @@ }

@@ -24,6 +24,6 @@ const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;

if ((input.length * 3) % 4 !== 0) {
throw new TypeError(`Incorrect padding on base64 string.`);
throw new TypeError('Incorrect padding on base64 string.');
}
if (!BASE64_REGEX.exec(input)) {
throw new TypeError(`Invalid base64 string.`);
throw new TypeError('Invalid base64 string.');
}

@@ -30,0 +30,0 @@ const buffer = encoding ? Buffer.from(input, encoding) : Buffer.from(input);

@@ -1,2 +0,2 @@

import { TRACER_KEY, METRICS_KEY, LOGGER_KEY, IDEMPOTENCY_KEY, } from './constants.js';
import { IDEMPOTENCY_KEY, LOGGER_KEY, METRICS_KEY, TRACER_KEY, } from './constants.js';
/**

@@ -3,0 +3,0 @@ * Typeguard to assert that an object is of Function type.

@@ -95,17 +95,15 @@ /**

}
else if (isNumber(value)) {
if (isNumber(value)) {
return value !== 0;
}
else if (typeof value === 'boolean') {
if (typeof value === 'boolean') {
return value;
}
else if (Array.isArray(value)) {
if (Array.isArray(value)) {
return value.length > 0;
}
else if (isRecord(value)) {
if (isRecord(value)) {
return Object.keys(value).length > 0;
}
else {
return false;
}
return false;
};

@@ -167,20 +165,18 @@ /**

}
else if (isRecord(value)) {
if (isRecord(value)) {
return 'object';
}
else if (isString(value)) {
if (isString(value)) {
return 'string';
}
else if (isNumber(value)) {
if (isNumber(value)) {
return 'number';
}
else if (typeof value === 'boolean') {
if (typeof value === 'boolean') {
return 'boolean';
}
else if (isNull(value)) {
if (isNull(value)) {
return 'null';
}
else {
return 'unknown';
}
return 'unknown';
};

@@ -187,0 +183,0 @@ /**

@@ -1,2 +0,2 @@

export declare const PT_VERSION = "2.5.0";
export declare const PT_VERSION = "2.6.0";
//# sourceMappingURL=version.d.ts.map
// this file is auto generated, do not modify
export const PT_VERSION = '2.5.0';
export const PT_VERSION = '2.6.0';
{
"name": "@aws-lambda-powertools/commons",
"version": "2.5.0",
"version": "2.6.0",
"description": "A shared utility package for Powertools for AWS Lambda (TypeScript) libraries",

@@ -5,0 +5,0 @@ "author": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet