This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add "ifok" function | |
global.ifok = function(args, msg, cb){ | |
var me = this; | |
args = Array.prototype.slice.call(args); | |
var err = args.shift(); | |
var log = (me.log || console.log); | |
//You can comment out a log message by adding a space at the beginning | |
if(msg.length && msg.charAt(0) === ' '){ | |
msg = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongodb = require('mongodb'); | |
var mongoose = require('mongoose'); | |
var id = '51a11f2d4da20b020000000a'; | |
var mongooseId = new mongoose.Types.ObjectId(id); | |
var mongoId = new mongodb.ObjectID(id); | |
var logs = []; | |
if(mongoId == mongooseId){ | |
logs.push('mongoId == mongooseId'); | |
} | |
else{ |
NewerOlder