thinodium
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -34,2 +34,3 @@ "use strict"; | ||
this._cfg = cfg || {}; | ||
if (this._cfg.schema) { | ||
@@ -39,2 +40,6 @@ this._schema = schemaBuilder(this._cfg.schema); | ||
_.each(this._cfg.modelMethods || {}, (m, k) => { | ||
this[k] = _.bind(m, this); | ||
}); | ||
// add event hooks to asynchronous internal methods | ||
@@ -41,0 +46,0 @@ let self = this; |
{ | ||
"name": "thinodium", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Light-weight, pluggable ODM for Node.js. Supports RethinkDB, etc", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -38,6 +38,6 @@ # Thinodium | ||
// thinodium instance | ||
const thinodium = require('thinodium'); | ||
const Thinodium = require('thinodium'); | ||
// create the connection | ||
const db = yield thinodium.connect('rethinkdb', { | ||
const db = yield Thinodium.connect('rethinkdb', { | ||
db: 'mydb', | ||
@@ -58,3 +58,3 @@ }); | ||
// connect using custom adatper | ||
const db = yield thinodium.connect('path/to/custom/adapter', { | ||
const db = yield Thinodium.connect('path/to/custom/adapter', { | ||
db: 'mydb', | ||
@@ -173,5 +173,5 @@ }); | ||
const thinodium = require('thinodium'); | ||
const Thinodium = require('thinodium'); | ||
class Database extends thinodium.Database { | ||
class Database extends Thinodium.Database { | ||
_connect (options) { | ||
@@ -178,0 +178,0 @@ return new Promise((resolve, reject) => { |
22377
521