UNPKG

dynamodb-toolbox

Version:

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

7 lines (6 loc) 334 B
import { item } from '../../../schema/item/index.js'; import { fromSchemaDTO as _fromSchemaDTO } from './fromSchemaDTO/index.js'; export const fromSchemaDTO = (schemaDTO) => item(Object.fromEntries(Object.entries(schemaDTO.attributes).map(([attributeName, attributeDTO]) => [ attributeName, _fromSchemaDTO(attributeDTO) ])));