UNPKG

dynamodb-toolbox

Version:

Lightweight and type-safe query builder for DynamoDB and TypeScript.

13 lines (12 loc) 450 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getItemSchemaDTO = void 0; const schema_js_1 = require("./schema.js"); const getItemSchemaDTO = (schema) => ({ type: 'item', attributes: Object.fromEntries(Object.entries(schema.attributes).map(([attributeName, attribute]) => [ attributeName, (0, schema_js_1.getSchemaDTO)(attribute) ])) }); exports.getItemSchemaDTO = getItemSchemaDTO;