This is new function for building more typesafe app with npdynamodb.ORM.
Here is desired syntax.
var Chat = npdynamodb.define('chats', {
npdynamodb: npd,
schema: new Schema(function(s){
s.string("id").hashKey();
s.number("timestamp").rangeKey().default(s.fn.NOW);
s.string("message");
s.map("user", [s.String, s.Any]);
})
});