dynamodb-toolbox
Version:
Lightweight and type-safe query builder for DynamoDB and TypeScript.
11 lines (10 loc) • 493 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.fromSchemaDTO = void 0;
const index_js_1 = require("../../../schema/item/index.js");
const index_js_2 = require("./fromSchemaDTO/index.js");
const fromSchemaDTO = (schemaDTO) => (0, index_js_1.item)(Object.fromEntries(Object.entries(schemaDTO.attributes).map(([attributeName, attributeDTO]) => [
attributeName,
(0, index_js_2.fromSchemaDTO)(attributeDTO)
])));
exports.fromSchemaDTO = fromSchemaDTO;