Home

Awesome

dbjs-ext

Common type extensions for dbjs engine

Installation

$ npm install dbjs-ext

To port it to Browser or any other (non CJS) environment, use your favorite CJS bundler. No favorite yet? Try: Browserify, Webmake or Webpack

Provided types

List of extensions is not closed and is still being completed.

Usage

var Database = require('dbjs');
var db = new Database();
require('dbjs-ext/string/string-line/email')(db)
require('dbjs-ext/string/string-line/password')(db);

Db.Object.create('User', {
  email: { type: db.Email, required: true },
  password: { db.Password, required: true }
});

Tests

$ npm test