Skip to content

mongoosejs/mongoose-bson-timestamps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mongoose-bson-timestamps

Implementation of BSON timestamp type for Mongoose

Usage

First, npm install @mongoosejs/bson-timestamp and import this package.

// Using Node.js `require()`
const Timestamp = require('@mongoosejs/bson-timestamp');

// Using ES6 imports
import Timestamp from '@mongoosejs/bson-timestamp';

You can then use Timestamp as a schema type in your schema definitions.

const Timestamp = require('@mongoosejs/bson-timestamp');
const mongoose = require('mongoose');

const schema = new mongoose.Schema({
  myTimestamp: { type: Timestamp }
});

About

Implementation of BSON timestamp type for Mongoose

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published