dynogels-promisified

1.0.4 • Public • Published

dynogels-promisified

I take no credit for this code. It is inspired by vogels-promisified but modified to use Dynogels.

This package promisifies the functions in Dynogels using Bluebird using the default 'Async' suffix. i.e. all methods in Dynogels are modified with an 'Async' suffix.

Usage

var dynogels = require("dynogels-promisified");

Example

var User = module.exports = dynogels.define("User", {
  hashKey : "userId",
  timestamps : false,
  schema : {
    userId: dynogels.types.uuid(),
    name: Joi.string(),
  },
});
 
User
  .getAsync(userId)
  .then(function(user){
    // ...
  })
  .catch(function(err){
    // ...
  });
 
User
  .scan()
  .where("userId").equals(userId)
  .execAsync()
  .then(function(user){
    // ...
  })
  .catch(function(err){
    // ...
  });

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    11,550
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    11,550
  • 1.0.3
    1
  • 1.0.2
    2
  • 1.0.1
    2
  • 1.0.0
    2

Package Sidebar

Install

npm i dynogels-promisified

Weekly Downloads

11,557

Version

1.0.4

License

MIT

Last publish

Collaborators

  • andrewoh