Clone or download
segayuu Merge pull request #29 from segayuu/query-lean-object
Changed to return plain object
Latest commit 9273f35 Sep 22, 2018

README.md

Warehouse

Build Status NPM version Coverage Status

A JSON database with Models, Schemas, and a flexible querying interface. It powers the wildly successful static site generator Hexo.

Installation

$ npm install warehouse

Usage

var Database = require('warehouse');
var db = new Database();

var Post = db.model('posts', {
  title: String,
  created: {type: Date, default: Date.now}
});

Post.insert({
  title: 'Hello world'
}).then(function(post){
  console.log(post);
});

Test

$ npm test