Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongoose-timestamp

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongoose-timestamp - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

6

index.js

@@ -8,4 +8,3 @@ /*!

var mongoose = require('mongoose');
var BinaryParser = require('mongoose/node_modules/mongodb/node_modules/bson').BinaryParser;
var BinaryParser = require('bson').BinaryParser;

@@ -20,4 +19,3 @@ function timestampsPlugin(schema, options) {

if (this._createdAt) return this._createdAt;
var unixtime = BinaryParser.decodeInt(this._id.id.slice(0, 4), 32, true, true);
return this._createdAt = new Date(unixtime * 1000);
return this._createdAt = this._id.getTimestamp();
});

@@ -24,0 +22,0 @@ schema.pre('save', function (next) {

{
"name": "mongoose-timestamp"
, "description": "Mongoose plugin that adds createdAt and updatedAt auto-assigned date properties"
, "version": "0.1.0"
, "version": "0.1.1"
, "author": "Nicholas Penree <nick@penree.com>"

@@ -12,6 +12,7 @@ , "keywords": ["mongodb", "mongoose", "plugin", "timestamps", "createdAt", "updatedAt"]

, "dependencies": {
"mongoose": ">= 3.0"
"bson": "0.2.2"
}
, "devDependencies": {
"should": ">= 0.2.1"
"mongoose": ">= 3.0"
, "should": ">= 0.2.1"
, "mocha": ">= 0.13.0"

@@ -26,2 +27,2 @@ }

}
}
}

@@ -1,2 +0,2 @@

Mongoose Timestamps Plugin
Mongoose Timestamps Plugin [![Build Status](https://secure.travis-ci.org/drudge/mongoose-timestamp.png?branch=master)](https://travis-ci.org/drudge/mongoose-timestamp)
==========================

@@ -3,0 +3,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc