Merge pull request #5710 from NodeBB/_lodash

Switch from underscore to lodash
This commit is contained in:
Barış Soner Uşaklı
2017-05-29 13:38:21 -04:00
committed by GitHub
31 changed files with 53 additions and 54 deletions

View File

@@ -2,7 +2,7 @@
var async = require('async');
var validator = require('validator');
var _ = require('underscore');
var _ = require('lodash');
var S = require('string');
var posts = require('../../posts');
@@ -69,7 +69,7 @@ module.exports = function (SocketPosts) {
], next);
},
function (results, next) {
var uids = _.unique(_.flatten(results).concat(socket.uid.toString()));
var uids = _.uniq(_.flatten(results).concat(socket.uid.toString()));
uids.forEach(function (uid) {
websockets.in('uid_' + uid).emit('event:post_edited', editResult);
});