Skip to content

nkt/node-ball

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ball

Circle CI

Simple MongoDB ODM

Usage

const {Ball} = require('ball');

let db = new Ball('mongodb://localhost/db');

class User {
  getFullName() {
    return `${this.firstName} ${this.secondName}`;
  }
}

db.find({}).map((user) => {
  console.log({
    fullName: user.getFullName()
  });
}).catch((err) => {
  // error handling
})

License

MIT