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

@aws-sdk/util-dynamodb

Package Overview
Dependencies
Maintainers
5
Versions
397
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/util-dynamodb - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

11

CHANGELOG.md

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

# [3.2.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.1.0...v3.2.0) (2021-01-09)
### Features
* **util-dynamodb:** enable undefined values removal in marshall ([#1840](https://github.com/aws/aws-sdk-js-v3/issues/1840)) ([314d3b3](https://github.com/aws/aws-sdk-js-v3/commit/314d3b37ac9d0d500e5762705be6188d9bd69625))
# [3.1.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.0.0...v3.1.0) (2020-12-23)

@@ -8,0 +19,0 @@

33

dist/cjs/convertToAttr.js

@@ -27,15 +27,21 @@ "use strict";

const convertToListAttr = (data, options) => ({
L: data.map((item) => exports.convertToAttr(item, options)),
L: data
.filter((item) => !(options === null || options === void 0 ? void 0 : options.removeUndefinedValues) || ((options === null || options === void 0 ? void 0 : options.removeUndefinedValues) && item !== undefined))
.map((item) => exports.convertToAttr(item, options)),
});
const convertToSetAttr = (set, options) => {
if (set.size === 0) {
const setToOperate = (options === null || options === void 0 ? void 0 : options.removeUndefinedValues) ? new Set([...set].filter((value) => value !== undefined)) : set;
if (!(options === null || options === void 0 ? void 0 : options.removeUndefinedValues) && setToOperate.has(undefined)) {
throw new Error(`Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.`);
}
if (setToOperate.size === 0) {
if (options === null || options === void 0 ? void 0 : options.convertEmptyValues) {
return convertToNullAttr();
}
throw new Error(`Please pass a non-empty set, or set convertEmptyValues to true.`);
throw new Error(`Pass a non-empty set, or options.convertEmptyValues=true.`);
}
const item = set.values().next().value;
const item = setToOperate.values().next().value;
if (typeof item === "number") {
return {
NS: Array.from(set)
NS: Array.from(setToOperate)
.map(convertToNumberAttr)

@@ -47,3 +53,3 @@ .map((item) => item.N),

return {
NS: Array.from(set)
NS: Array.from(setToOperate)
.map(convertToBigIntAttr)

@@ -55,3 +61,3 @@ .map((item) => item.N),

return {
SS: Array.from(set)
SS: Array.from(setToOperate)
.map(convertToStringAttr)

@@ -65,3 +71,3 @@ .map((item) => item.S),

// @ts-expect-error Type 'ArrayBuffer' is not assignable to type 'Uint8Array'
BS: Array.from(set)
BS: Array.from(setToOperate)
.map(convertToBinaryAttr)

@@ -76,3 +82,5 @@ .map((item) => item.B),

const convertToMapAttr = (data, options) => ({
M: Object.entries(data).reduce((acc, [key, value]) => ({
M: Object.entries(data)
.filter(([key, value]) => !(options === null || options === void 0 ? void 0 : options.removeUndefinedValues) || ((options === null || options === void 0 ? void 0 : options.removeUndefinedValues) && value !== undefined))
.reduce((acc, [key, value]) => ({
...acc,

@@ -83,3 +91,6 @@ [key]: exports.convertToAttr(value, options),

const convertToScalarAttr = (data, options) => {
if (data === null && typeof data === "object") {
if (data === undefined) {
throw new Error(`Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.`);
}
else if (data === null && typeof data === "object") {
return convertToNullAttr();

@@ -157,2 +168,2 @@ }

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udmVydFRvQXR0ci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0VG9BdHRyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUtBOzs7OztHQUtHO0FBQ0ksTUFBTSxhQUFhLEdBQUcsQ0FBQyxJQUEwQixFQUFFLE9BQXlCLEVBQWtCLEVBQUU7O0lBQ3JHLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBRTtRQUN2QixPQUFPLGlCQUFpQixDQUFDLElBQUksRUFBRSxPQUFPLENBQUMsQ0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BOOiBudW0udG9TdHJpbmcoKSB9O1xufTtcblxuY29uc3QgaXNCaW5hcnkgPSAoZGF0YTogYW55KTogYm9vbGVhbiA9PiB7XG4gIGNvbnN0IGJpbmFyeVR5cGVzID0gW1xuICAgIFwiQXJyYXlCdWZmZXJcIixcbiAgICBcIkJsb2JcIixcbiAgICBcIkJ1ZmZlclwiLFxuICAgIFwiRGF0YVZpZXdcIixcbiAgICBcIkZpbGVcIixcbiAgICBcIkludDhBcnJheVwiLFxuICAgIFwiVWludDhBcnJheVwiLFxuICAgIFwiVWludDhDbGFtcGVkQXJyYXlcIixcbiAgICBcIkludDE2QXJyYXlcIixcbiAgICBcIlVpbnQxNkFycmF5XCIsXG4gICAgXCJJbnQzMkFycmF5XCIsXG4gICAgXCJVaW50MzJBcnJheVwiLFxuICAgIFwiRmxvYXQzMkFycmF5XCIsXG4gICAgXCJGbG9hdDY0QXJyYXlcIixcbiAgICBcIkJpZ0ludDY0QXJyYXlcIixcbiAgICBcIkJpZ1VpbnQ2NEFycmF5XCIsXG4gIF07XG5cbiAgaWYgKGRhdGE/LmNvbnN0cnVjdG9yKSB7XG4gICAgcmV0dXJuIGJpbmFyeVR5cGVzLmluY2x1ZGVzKGRhdGEuY29uc3RydWN0b3IubmFtZSk7XG4gIH1cbiAgcmV0dXJuIGZhbHNlO1xufTtcbiJdfQ==

@@ -11,2 +11,6 @@ import { AttributeValue } from "@aws-sdk/client-dynamodb";

convertEmptyValues?: boolean;
/**
* Whether to remove undefined values while marshalling.
*/
removeUndefinedValues?: boolean;
}

@@ -13,0 +17,0 @@ /**

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

exports.marshall = marshall;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFyc2hhbGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbWFyc2hhbGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBRUEsbURBQWdE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oZXRoZXIgdG8gYXV0b21hdGljYWxseSBjb252ZXJ0IGVtcHR5IHN0cmluZ3MsIGJsb2JzLCBhbmQgc2V0cyB0byBgbnVsbGBcbiAgICovXG4gIGNvbnZlcnRFbXB0eVZhbHVlcz86IGJvb2xlYW47XG4gIC8qKlxuICAgKiBXaGV0aGVyIHRvIHJlbW92ZSB1bmRlZmluZWQgdmFsdWVzIHdoaWxlIG1hcnNoYWxsaW5nLlxuICAgKi9cbiAgcmVtb3ZlVW5kZWZpbmVkVmFsdWVzPzogYm9vbGVhbjtcbn1cblxuLyoqXG4gKiBDb252ZXJ0IGEgSmF2YVNjcmlwdCBvYmplY3QgaW50byBhIER5bmFtb0RCIHJlY29yZC5cbiAqXG4gKiBAcGFyYW0ge2FueX0gZGF0YSAtIFRoZSBkYXRhIHRvIGNvbnZlcnQgdG8gYSBEeW5hbW9EQiByZWNvcmRcbiAqIEBwYXJhbSB7bWFyc2hhbGxPcHRpb25zfSBvcHRpb25zIC0gQW4gb3B0aW9uYWwgY29uZmlndXJhdGlvbiBvYmplY3QgZm9yIGBtYXJzaGFsbGBcbiAqL1xuZXhwb3J0IGNvbnN0IG1hcnNoYWxsID0gKFxuICBkYXRhOiB7IFtrZXk6IHN0cmluZ106IE5hdGl2ZUF0dHJpYnV0ZVZhbHVlIH0sXG4gIG9wdGlvbnM/OiBtYXJzaGFsbE9wdGlvbnNcbik6IHsgW2tleTogc3RyaW5nXTogQXR0cmlidXRlVmFsdWUgfSA9PiBjb252ZXJ0VG9BdHRyKGRhdGEsIG9wdGlvbnMpLk0gYXMgeyBba2V5OiBzdHJpbmddOiBBdHRyaWJ1dGVWYWx1ZSB9O1xuIl19

@@ -15,4 +15,4 @@ /// <reference types="node" />

[key: string]: NativeAttributeValue;
} | NativeAttributeValue[] | Set<number | bigint | NumberValue | string | NativeAttributeBinary>;
export declare type NativeScalarAttributeValue = null | boolean | number | NumberValue | bigint | NativeAttributeBinary | string;
} | NativeAttributeValue[] | Set<number | bigint | NumberValue | string | NativeAttributeBinary | undefined>;
export declare type NativeScalarAttributeValue = null | undefined | boolean | number | NumberValue | bigint | NativeAttributeBinary | string;
export declare type NativeAttributeBinary = ArrayBuffer | Blob | Buffer | DataView | File | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kZWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21vZGVscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBBIGludGVyZmFjZSByZWNvZ25pemFibGUgYXMgYSBudW1lcmljIHZhbHVlIHRoYXQgc3RvcmVzIHRoZSB1bmRlcmx5aW5nIG51bWJlclxuICogYXMgYSBzdHJpbmcuXG4gKlxuICogSW50ZW5kZWQgdG8gYmUgYSBkZXNlcmlhbGl6YXRpb24gdGFyZ2V0IGZvciB0aGUgRHluYW1vREIgRG9jdW1lbnQgQ2xpZW50IHdoZW5cbiAqIHRoZSBgd3JhcE51bWJlcnNgIGZsYWcgaXMgc2V0LiBUaGlzIGFsbG93cyBmb3IgbnVtZXJpYyB2YWx1ZXMgdGhhdCBsb3NlXG4gKiBwcmVjaXNpb24gd2hlbiBjb252ZXJ0ZWQgdG8gSmF2YVNjcmlwdCdzIGBudW1iZXJgIHR5cGUuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgTnVtYmVyVmFsdWUge1xuICByZWFkb25seSB2YWx1ZTogc3RyaW5nO1xufVxuXG5leHBvcnQgdHlwZSBOYXRpdmVBdHRyaWJ1dGVWYWx1ZSA9XG4gIHwgTmF0aXZlU2NhbGFyQXR0cmlidXRlVmFsdWVcbiAgfCB7IFtrZXk6IHN0cmluZ106IE5hd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0YVZpZXdcbiAgfCBGaWxlXG4gIHwgSW50OEFycmF5XG4gIHwgVWludDhBcnJheVxuICB8IFVpbnQ4Q2xhbXBlZEFycmF5XG4gIHwgSW50MTZBcnJheVxuICB8IFVpbnQxNkFycmF5XG4gIHwgSW50MzJBcnJheVxuICB8IFVpbnQzMkFycmF5XG4gIHwgRmxvYXQzMkFycmF5XG4gIHwgRmxvYXQ2NEFycmF5XG4gIHwgQmlnSW50NjRBcnJheVxuICB8IEJpZ1VpbnQ2NEFycmF5O1xuIl19

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

import { __assign, __read } from "tslib";
import { __assign, __read, __spread } from "tslib";
/**

@@ -24,15 +24,21 @@ * Convert a JavaScript value to its equivalent DynamoDB AttributeValue type

var convertToListAttr = function (data, options) { return ({
L: data.map(function (item) { return convertToAttr(item, options); }),
L: data
.filter(function (item) { return !(options === null || options === void 0 ? void 0 : options.removeUndefinedValues) || ((options === null || options === void 0 ? void 0 : options.removeUndefinedValues) && item !== undefined); })
.map(function (item) { return convertToAttr(item, options); }),
}); };
var convertToSetAttr = function (set, options) {
if (set.size === 0) {
var setToOperate = (options === null || options === void 0 ? void 0 : options.removeUndefinedValues) ? new Set(__spread(set).filter(function (value) { return value !== undefined; })) : set;
if (!(options === null || options === void 0 ? void 0 : options.removeUndefinedValues) && setToOperate.has(undefined)) {
throw new Error("Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.");
}
if (setToOperate.size === 0) {
if (options === null || options === void 0 ? void 0 : options.convertEmptyValues) {
return convertToNullAttr();
}
throw new Error("Please pass a non-empty set, or set convertEmptyValues to true.");
throw new Error("Pass a non-empty set, or options.convertEmptyValues=true.");
}
var item = set.values().next().value;
var item = setToOperate.values().next().value;
if (typeof item === "number") {
return {
NS: Array.from(set)
NS: Array.from(setToOperate)
.map(convertToNumberAttr)

@@ -44,3 +50,3 @@ .map(function (item) { return item.N; }),

return {
NS: Array.from(set)
NS: Array.from(setToOperate)
.map(convertToBigIntAttr)

@@ -52,3 +58,3 @@ .map(function (item) { return item.N; }),

return {
SS: Array.from(set)
SS: Array.from(setToOperate)
.map(convertToStringAttr)

@@ -62,3 +68,3 @@ .map(function (item) { return item.S; }),

// @ts-expect-error Type 'ArrayBuffer' is not assignable to type 'Uint8Array'
BS: Array.from(set)
BS: Array.from(setToOperate)
.map(convertToBinaryAttr)

@@ -73,3 +79,8 @@ .map(function (item) { return item.B; }),

var convertToMapAttr = function (data, options) { return ({
M: Object.entries(data).reduce(function (acc, _a) {
M: Object.entries(data)
.filter(function (_a) {
var _b = __read(_a, 2), key = _b[0], value = _b[1];
return !(options === null || options === void 0 ? void 0 : options.removeUndefinedValues) || ((options === null || options === void 0 ? void 0 : options.removeUndefinedValues) && value !== undefined);
})
.reduce(function (acc, _a) {
var _b;

@@ -81,3 +92,6 @@ var _c = __read(_a, 2), key = _c[0], value = _c[1];

var convertToScalarAttr = function (data, options) {
if (data === null && typeof data === "object") {
if (data === undefined) {
throw new Error("Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.");
}
else if (data === null && typeof data === "object") {
return convertToNullAttr();

@@ -155,2 +169,2 @@ }

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udmVydFRvQXR0ci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb252ZXJ0VG9BdHRyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFLQTs7Ozs7R0FLRztBQUNILE1BQU0sQ0FBQyxJQUFNLGFBQWEsR0FBRyxVQUFDLElBQTBCLEVBQUUsT0FBeUI7O0lBQ2pGLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsRUFBRTtRQUN2QixPQUFPLGlCQUFpQixDQUFDLElBQUksRUFBRSxPQUFPLENBQUMsQ0FBQztLQUN6QztTQUFNLElBQUksT0FBQSxJQUFJLGFBQUosSUFBSSx1QkFBSixJQUFJLENBQUUsV0FBVyww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TogYW55KTogYm9vbGVhbiA9PiB7XG4gIGNvbnN0IGJpbmFyeVR5cGVzID0gW1xuICAgIFwiQXJyYXlCdWZmZXJcIixcbiAgICBcIkJsb2JcIixcbiAgICBcIkJ1ZmZlclwiLFxuICAgIFwiRGF0YVZpZXdcIixcbiAgICBcIkZpbGVcIixcbiAgICBcIkludDhBcnJheVwiLFxuICAgIFwiVWludDhBcnJheVwiLFxuICAgIFwiVWludDhDbGFtcGVkQXJyYXlcIixcbiAgICBcIkludDE2QXJyYXlcIixcbiAgICBcIlVpbnQxNkFycmF5XCIsXG4gICAgXCJJbnQzMkFycmF5XCIsXG4gICAgXCJVaW50MzJBcnJheVwiLFxuICAgIFwiRmxvYXQzMkFycmF5XCIsXG4gICAgXCJGbG9hdDY0QXJyYXlcIixcbiAgICBcIkJpZ0ludDY0QXJyYXlcIixcbiAgICBcIkJpZ1VpbnQ2NEFycmF5XCIsXG4gIF07XG5cbiAgaWYgKGRhdGE/LmNvbnN0cnVjdG9yKSB7XG4gICAgcmV0dXJuIGJpbmFyeVR5cGVzLmluY2x1ZGVzKGRhdGEuY29uc3RydWN0b3IubmFtZSk7XG4gIH1cbiAgcmV0dXJuIGZhbHNlO1xufTtcbiJdfQ==

@@ -11,2 +11,6 @@ import { AttributeValue } from "@aws-sdk/client-dynamodb";

convertEmptyValues?: boolean;
/**
* Whether to remove undefined values while marshalling.
*/
removeUndefinedValues?: boolean;
}

@@ -13,0 +17,0 @@ /**

@@ -9,2 +9,2 @@ import { convertToAttr } from "./convertToAttr";

export var marshall = function (data, options) { return convertToAttr(data, options).M; };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFyc2hhbGwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbWFyc2hhbGwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLGlCQUFpQixD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iAgLyoqXG4gICAqIFdoZXRoZXIgdG8gYXV0b21hdGljYWxseSBjb252ZXJ0IGVtcHR5IHN0cmluZ3MsIGJsb2JzLCBhbmQgc2V0cyB0byBgbnVsbGBcbiAgICovXG4gIGNvbnZlcnRFbXB0eVZhbHVlcz86IGJvb2xlYW47XG4gIC8qKlxuICAgKiBXaGV0aGVyIHRvIHJlbW92ZSB1bmRlZmluZWQgdmFsdWVzIHdoaWxlIG1hcnNoYWxsaW5nLlxuICAgKi9cbiAgcmVtb3ZlVW5kZWZpbmVkVmFsdWVzPzogYm9vbGVhbjtcbn1cblxuLyoqXG4gKiBDb252ZXJ0IGEgSmF2YVNjcmlwdCBvYmplY3QgaW50byBhIER5bmFtb0RCIHJlY29yZC5cbiAqXG4gKiBAcGFyYW0ge2FueX0gZGF0YSAtIFRoZSBkYXRhIHRvIGNvbnZlcnQgdG8gYSBEeW5hbW9EQiByZWNvcmRcbiAqIEBwYXJhbSB7bWFyc2hhbGxPcHRpb25zfSBvcHRpb25zIC0gQW4gb3B0aW9uYWwgY29uZmlndXJhdGlvbiBvYmplY3QgZm9yIGBtYXJzaGFsbGBcbiAqL1xuZXhwb3J0IGNvbnN0IG1hcnNoYWxsID0gKFxuICBkYXRhOiB7IFtrZXk6IHN0cmluZ106IE5hdGl2ZUF0dHJpYnV0ZVZhbHVlIH0sXG4gIG9wdGlvbnM/OiBtYXJzaGFsbE9wdGlvbnNcbik6IHsgW2tleTogc3RyaW5nXTogQXR0cmlidXRlVmFsdWUgfSA9PiBjb252ZXJ0VG9BdHRyKGRhdGEsIG9wdGlvbnMpLk0gYXMgeyBba2V5OiBzdHJpbmddOiBBdHRyaWJ1dGVWYWx1ZSB9O1xuIl19

@@ -15,4 +15,4 @@ /// <reference types="node" />

[key: string]: NativeAttributeValue;
} | NativeAttributeValue[] | Set<number | bigint | NumberValue | string | NativeAttributeBinary>;
export declare type NativeScalarAttributeValue = null | boolean | number | NumberValue | bigint | NativeAttributeBinary | string;
} | NativeAttributeValue[] | Set<number | bigint | NumberValue | string | NativeAttributeBinary | undefined>;
export declare type NativeScalarAttributeValue = null | undefined | boolean | number | NumberValue | bigint | NativeAttributeBinary | string;
export declare type NativeAttributeBinary = ArrayBuffer | Blob | Buffer | DataView | File | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kZWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21vZGVscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBBIGludGVyZmFjZSByZWNvZ25pemFibGUgYXMgYSBudW1lcmljIHZhbHVlIHRoYXQgc3RvcmVzIHRoZSB1bmRlcmx5aW5nIG51bWJlclxuICogYXMgYSBzdHJpbmcuXG4gKlxuICogSW50ZW5kZWQgdG8gYmUgYSBkZXNlcmlhbGl6YXRpb24gdGFyZ2V0IGZvciB0aGUgRHluYW1vREIgRG9jdW1lbnQgQ2xpZW50IHdoZW5cbiAqIHRoZSBgd3JhcE51bWJlcnNgIGZsYWcgaXMgc2V0LiBUaGlzIGFsbG93cyBmb3IgbnVtZXJpYyB2YWx1ZXMgdGhhdCBsb3NlXG4gKiBwcmVjaXNpb24gd2hlbiBjb252ZXJ0ZWQgdG8gSmF2YVNjcmlwdCdzIGBudW1iZXJgIHR5cGUuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgTnVtYmVyVmFsdWUge1xuICByZWFkb25seSB2YWx1ZTogc3RyaW5nO1xufVxuXG5leHBvcnQgdHlwZSBOYXRpdmVBdHRyaWJ1dGVWYWx1ZSA9XG4gIHwgTmF0aXZlU2NhbGFyQXR0cmlidXRlVmFsdWVcbiAgfCB7IFtrZXk6IHN0cmluZ106IE5hdGl2ZUF0d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biAgfCBGaWxlXG4gIHwgSW50OEFycmF5XG4gIHwgVWludDhBcnJheVxuICB8IFVpbnQ4Q2xhbXBlZEFycmF5XG4gIHwgSW50MTZBcnJheVxuICB8IFVpbnQxNkFycmF5XG4gIHwgSW50MzJBcnJheVxuICB8IFVpbnQzMkFycmF5XG4gIHwgRmxvYXQzMkFycmF5XG4gIHwgRmxvYXQ2NEFycmF5XG4gIHwgQmlnSW50NjRBcnJheVxuICB8IEJpZ1VpbnQ2NEFycmF5O1xuIl19
{
"name": "@aws-sdk/util-dynamodb",
"version": "3.1.0",
"version": "3.2.0",
"scripts": {

@@ -24,3 +24,3 @@ "prepublishOnly": "yarn build:cjs && yarn build:es",

"devDependencies": {
"@aws-sdk/client-dynamodb": "3.1.0",
"@aws-sdk/client-dynamodb": "3.2.0",
"@types/jest": "^26.0.4",

@@ -27,0 +27,0 @@ "jest": "^26.1.0",

@@ -25,3 +25,5 @@ import { AttributeValue } from "@aws-sdk/client-dynamodb";

const convertToListAttr = (data: NativeAttributeValue[], options?: marshallOptions): { L: AttributeValue[] } => ({
L: data.map((item) => convertToAttr(item, options)),
L: data
.filter((item) => !options?.removeUndefinedValues || (options?.removeUndefinedValues && item !== undefined))
.map((item) => convertToAttr(item, options)),
});

@@ -33,13 +35,19 @@

): { NS: string[] } | { BS: Uint8Array[] } | { SS: string[] } | { NULL: true } => {
if (set.size === 0) {
const setToOperate = options?.removeUndefinedValues ? new Set([...set].filter((value) => value !== undefined)) : set;
if (!options?.removeUndefinedValues && setToOperate.has(undefined)) {
throw new Error(`Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.`);
}
if (setToOperate.size === 0) {
if (options?.convertEmptyValues) {
return convertToNullAttr();
}
throw new Error(`Please pass a non-empty set, or set convertEmptyValues to true.`);
throw new Error(`Pass a non-empty set, or options.convertEmptyValues=true.`);
}
const item = set.values().next().value;
const item = setToOperate.values().next().value;
if (typeof item === "number") {
return {
NS: Array.from(set)
NS: Array.from(setToOperate)
.map(convertToNumberAttr)

@@ -50,3 +58,3 @@ .map((item) => item.N),

return {
NS: Array.from(set)
NS: Array.from(setToOperate)
.map(convertToBigIntAttr)

@@ -57,3 +65,3 @@ .map((item) => item.N),

return {
SS: Array.from(set)
SS: Array.from(setToOperate)
.map(convertToStringAttr)

@@ -66,3 +74,3 @@ .map((item) => item.S),

// @ts-expect-error Type 'ArrayBuffer' is not assignable to type 'Uint8Array'
BS: Array.from(set)
BS: Array.from(setToOperate)
.map(convertToBinaryAttr)

@@ -80,13 +88,20 @@ .map((item) => item.B),

): { M: { [key: string]: AttributeValue } } => ({
M: Object.entries(data).reduce(
(acc: { [key: string]: AttributeValue }, [key, value]: [string, NativeAttributeValue]) => ({
...acc,
[key]: convertToAttr(value, options),
}),
{}
),
M: Object.entries(data)
.filter(
([key, value]: [string, NativeAttributeValue]) =>
!options?.removeUndefinedValues || (options?.removeUndefinedValues && value !== undefined)
)
.reduce(
(acc: { [key: string]: AttributeValue }, [key, value]: [string, NativeAttributeValue]) => ({
...acc,
[key]: convertToAttr(value, options),
}),
{}
),
});
const convertToScalarAttr = (data: NativeScalarAttributeValue, options?: marshallOptions): AttributeValue => {
if (data === null && typeof data === "object") {
if (data === undefined) {
throw new Error(`Pass options.removeUndefinedValues=true to remove undefined values from map/array/set.`);
} else if (data === null && typeof data === "object") {
return convertToNullAttr();

@@ -93,0 +108,0 @@ } else if (typeof data === "boolean") {

@@ -14,2 +14,6 @@ import { AttributeValue } from "@aws-sdk/client-dynamodb";

convertEmptyValues?: boolean;
/**
* Whether to remove undefined values while marshalling.
*/
removeUndefinedValues?: boolean;
}

@@ -16,0 +20,0 @@

@@ -17,6 +17,7 @@ /**

| NativeAttributeValue[]
| Set<number | bigint | NumberValue | string | NativeAttributeBinary>;
| Set<number | bigint | NumberValue | string | NativeAttributeBinary | undefined>;
export type NativeScalarAttributeValue =
| null
| undefined
| boolean

@@ -23,0 +24,0 @@ | number

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