Mohawk
A bad-ass object document mapper for Amazon DynamoDB.
WIP Warning
This is a work in progress. Currently mohawk only offers limited functionality (and test coverage). There will be more to come soon. API changes will likely happen.
Install
$ npm install mohawk --save
Usage
Mohawk is designed to work well future language features (like async/await) offered by babel. As such all examples assume you are using babel.
static prefix = 'myapp-' static service = // dynamo config options here... static table = 'things' static hashKey = 'id' static rangeKey = 'version' { let thing = id: 'foo' version: 'bar' name: 'baz' await thing // => true await thing // => false, already saved thingname = 'buz' await thing // => true, changed since last saved let otherThing = await Thing await otherThing // => false, not change yet otherThingname = 'Mr. T' otherThing // => true // ... you get the idea}