JSPM

mongoose-time

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 256
  • Score
    100M100P100Q92059F
  • License MIT

mongoose timestamps

Package Exports

  • mongoose-time

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mongoose-time) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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