node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป


Be able to query mongodb records in the given timeperiod by ObjectId

var timestampToObjectId = require('timestamp-objectId');
// timestampToObjectId = function(timestamp)
// timestamp could be both String and actual Timestamp

  _id: {
    $gt: timestampToObjectId('1980/05/25'),
    $lt: timestampToObjectId(1367413318476)