mongojs = require("../../infrastructure/mongojs") db = mongojs.db ObjectId = mongojs.ObjectId module.exports = UserUpdater = updateUser: (query, update, callback = (error) ->) -> if typeof query == "string" query = _id: ObjectId(query) else if query instanceof ObjectId query = _id: query db.users.update query, update, callback