1.0.4 • Published 7 years ago

@bluewaitor/mongoose-plugin-timestamp v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

mongoose-plugin-timestamps

mongoose plugin auto create timestamp and update timestamp.

Usage

install

npm install @bluewaitor/mongoose-plugin-timestamp --save

use in global

    const mongoose = require('mongoose');
    const timestampPlugin = require('@bluewaitor/mongoose-plugin-timestamp');

    mongoose.plugin(timestampPlugin, {index: true});

use in schema

    const someSchema = mongoose.Schema({});
    someSchema.plugin(timestampPlugin, {index: true});

properties

this plugin will create two properties created and updated in models. custom properties not support yet.

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago