Skip to content

Strips DynamoDB Stream Items of its schema and returns a plain JavaScript object

License

Notifications You must be signed in to change notification settings

Simbotix/eskimo-stripper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Eskimo Stripper

Version npm GitHub stars GitHub license Eskimo Stripper

Eskimo Stripper strips DynamoDB Stream Items of its schema and returns a plain JavaScript object.

Example:

var strip = require('eskimo-stripper').strip;
var item = strip(streamItem);
import { strip } from 'eskimo-stripper';
const item = strip(streamItem);

Sample input:

{
  "firstLevelList": {
    "L": [
      {
        "S": "firstLevelListString"
      },
      {
        "M": {
          "numberNestedInMapNestedInList": {
            "N": "1"
          }
        }
      }
    ]
  },
  "customerEmail": {
    "S": "[email protected]"
  },
  "resultCode": {
    "S": "resultCode"
  }, ...

Sample output:

{ firstLevelList: [ 'firstLevelListString', { numberNestedInMapNestedInList: 1 } ],
  customerEmail: '[email protected]',
  resultCode: 'resultCode',
  id: 'id123',
  firstLevelMap:
   { nestedList: [ 'firstLevelMap.nestedList.String.Value', 1 ],
     numberField: 1,
     stringField: 'firstLevelMap.stringField',
     nestedMap: { nestedStringField: 'firstLevelMap.nestedMap.nestedStringField' } },
  transactionTimestamp: 123
}

Installing

$ npm install --save eskimo-stripper

Contributing

Contributions are always welcome!

Credits

Developed by microapps Used in our live products: MoonMail & MONEI

License

Eskimo Stripper is available under the MIT license. See the LICENSE file for more info.

About

Strips DynamoDB Stream Items of its schema and returns a plain JavaScript object

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published