@aws-sdk/lib-dynamodb 3.211.0 → 3.213.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,14 +24,17 @@ const processKeyInObj = (obj, processFunc, children) => {
24
24
  }
25
25
  return processObj(obj, processFunc, children);
26
26
  };
27
- const processKeysInObj = (obj, processFunc, keyNodes) => keyNodes.reduce((acc, { key, children }) => ({
28
- ...acc,
29
- [key]: processKeyInObj(acc[key], processFunc, children),
30
- }), obj);
31
- const processAllKeysInObj = (obj, processFunc, children) => Object.entries(obj).reduce((acc, [key, value]) => ({
32
- ...acc,
33
- [key]: processKeyInObj(value, processFunc, children),
34
- }), {});
27
+ const processKeysInObj = (obj, processFunc, keyNodes) => {
28
+ const accumulator = { ...obj };
29
+ return keyNodes.reduce((acc, { key, children }) => {
30
+ acc[key] = processKeyInObj(acc[key], processFunc, children);
31
+ return acc;
32
+ }, accumulator);
33
+ };
34
+ const processAllKeysInObj = (obj, processFunc, children) => Object.entries(obj).reduce((acc, [key, value]) => {
35
+ acc[key] = processKeyInObj(value, processFunc, children);
36
+ return acc;
37
+ }, {});
35
38
  const marshallInput = (obj, keyNodes, options) => {
36
39
  const marshallFunc = (toMarshall) => (0, util_dynamodb_1.marshall)(toMarshall, options);
37
40
  return processKeysInObj(obj, marshallFunc, keyNodes);
@@ -21,14 +21,17 @@ const processKeyInObj = (obj, processFunc, children) => {
21
21
  }
22
22
  return processObj(obj, processFunc, children);
23
23
  };
24
- const processKeysInObj = (obj, processFunc, keyNodes) => keyNodes.reduce((acc, { key, children }) => ({
25
- ...acc,
26
- [key]: processKeyInObj(acc[key], processFunc, children),
27
- }), obj);
28
- const processAllKeysInObj = (obj, processFunc, children) => Object.entries(obj).reduce((acc, [key, value]) => ({
29
- ...acc,
30
- [key]: processKeyInObj(value, processFunc, children),
31
- }), {});
24
+ const processKeysInObj = (obj, processFunc, keyNodes) => {
25
+ const accumulator = { ...obj };
26
+ return keyNodes.reduce((acc, { key, children }) => {
27
+ acc[key] = processKeyInObj(acc[key], processFunc, children);
28
+ return acc;
29
+ }, accumulator);
30
+ };
31
+ const processAllKeysInObj = (obj, processFunc, children) => Object.entries(obj).reduce((acc, [key, value]) => {
32
+ acc[key] = processKeyInObj(value, processFunc, children);
33
+ return acc;
34
+ }, {});
32
35
  export const marshallInput = (obj, keyNodes, options) => {
33
36
  const marshallFunc = (toMarshall) => marshall(toMarshall, options);
34
37
  return processKeysInObj(obj, marshallFunc, keyNodes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/lib-dynamodb",
3
- "version": "3.211.0",
3
+ "version": "3.213.0",
4
4
  "description": "The document client simplifies working with items in Amazon DynamoDB by abstracting away the notion of attribute values.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@aws-sdk/util-dynamodb": "3.211.0",
27
+ "@aws-sdk/util-dynamodb": "3.213.0",
28
28
  "tslib": "^2.3.1"
29
29
  },
30
30
  "peerDependencies": {
@@ -33,9 +33,9 @@
33
33
  "@aws-sdk/types": "^3.0.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@aws-sdk/client-dynamodb": "3.211.0",
37
- "@aws-sdk/smithy-client": "3.209.0",
38
- "@aws-sdk/types": "3.208.0",
36
+ "@aws-sdk/client-dynamodb": "3.213.0",
37
+ "@aws-sdk/smithy-client": "3.212.0",
38
+ "@aws-sdk/types": "3.212.0",
39
39
  "@tsconfig/recommended": "1.0.1",
40
40
  "@types/node": "^14.11.2",
41
41
  "concurrently": "7.0.0",