triangle-utils 1.0.3 → 1.0.4
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.
- package/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,11 +2,11 @@ import * as utils_dynamodb from "./dynamodb.js"
|
|
|
2
2
|
|
|
3
3
|
import { DynamoDB } from "@aws-sdk/client-dynamodb"
|
|
4
4
|
|
|
5
|
-
export function get_utils(config) {
|
|
5
|
+
export default function get_utils(config) {
|
|
6
6
|
const utils = {}
|
|
7
7
|
const dynamodb = new DynamoDB({ region : config.region })
|
|
8
|
-
for (const util of utils_dynamodb) {
|
|
9
|
-
utils[
|
|
8
|
+
for (const [util_name, util] of Object.entries(utils_dynamodb)) {
|
|
9
|
+
utils[util_name] = async (...args) => await util(dynamodb, ...args)
|
|
10
10
|
}
|
|
11
11
|
return utils
|
|
12
|
-
}
|
|
12
|
+
}
|