Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mongoose-time

yields7.1kMIT0.1.0

mongoose timestamps

mongoose, timestamps

readme

mongoose-time

timestamps for mongoose, populates created_at and updated_at.

Installation

$ npm install mongoose-time

Usage


var mongoose = require('mongoose')
  , Schema = mongoose.Schema
  , model = mongoose.model.bind(mongoose)
  , timestamps = require('mongoose-time');

var schema = new Schema({}).plugin(timestamps());
var Artist = model('Artist', schema);

Running tests

make sure you edit db.json to set the database the test should run on.

$ make test

License

MIT

changelog

0.1.0 / 2012-12-08

  • schema.plugin(timestamps) > schema.plugin(timestamps())

0.0.1 / 2012-11-28

  • initial