model-memory-sync

in memory model storage

model-memory-sync

In memory storage for node-model. Useful for testing.

npm install model-memory-sync
var model = require('node-model')
 
var Post = model('Post')
  .attr('id')
  .attr('title')
  .attr('body')
 
Post.sync = require('model-memory-sync')
 
var post = new Post({title: "My Awesome Post", body: "Is awesome"})
post.save(function(err) {
  ...
})
npm test