JSPM

dynamodb-value

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 90
  • Score
    100M100P100Q70100F
  • License MIT

Package Exports

  • dynamodb-value

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dynamodb-value) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

dynamodb-value Build Status

Convert javascript object into dynamodb schema and back. This is a simplified version of a more complete solution: official sdk from aws

This module does not support data types that are not native to javascript

    var DynamoDBValue = require('dynamodb-value')
    
    var jsObj = {
        str: '1439057466535',
        num: 123,
        obj: { z: '1' },
        list: ['123', { b: '2' }]
    }

    var ddbObject = {
        str: { S: '1439057466535' },
        num: { N: '123' },
        obj: {M: { z: { S: '1' }}},
        list: { L: [ { S: '123' }, { M: { b: { S: '2' }}}] }
    }

    DynamoDBValue.toJavascript(ddbObject) // deeply equal jsObj
    DynamoDBValue.toDDB(jsObj) // deeply equal ddbObject

MIT © ironSource