node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »


dynamo-schema is a sanitization and validation module for Amazon DynamoDB data models. It is meant as an item schema and is meant to be used in conjunction with the low level methods provided by dynamo drivers such as this one .


var Schema = require('dynamo-schema');
schema = new Schema({
  name: 'S',
  created_at: 'N',
  colors: 'SS',
  dates: 'NN'
var output = schema.sanitize({
  name: 'Andrew',
  colors: ['red', 'blue'],
  dates: [,]
var new_object = schema.parse(output);
// new object should be identical to the original object passed into sanitize 


npm install dynamo-schema

Run Tests

Ensure you have mocha installed. npm install mocha.

mocha test/test.js --reporter spec


  • Per Attribute bignum support
  • More types to use in schema definitions
    • enum
    • dates
    • regex
  • More tests
  • API docs