js: Avoid _.first, _.last, _.initial, _.tail.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2022-01-24 00:20:01 -08:00
committed by Tim Abbott
parent 42931e69e6
commit cc40352541
3 changed files with 17 additions and 19 deletions

View File

@@ -1,5 +1,4 @@
import $ from "jquery";
import _ from "lodash";
import * as emoji from "../shared/js/emoji";
import render_message_reaction from "../templates/message_reaction.hbs";
@@ -172,8 +171,8 @@ function generate_title(emoji_name, user_ids) {
);
}
context.comma_separated_usernames = _.initial(usernames).join(", ");
context.last_username = _.last(usernames);
context.comma_separated_usernames = usernames.slice(0, -1).join(", ");
context.last_username = usernames.at(-1);
if (current_user_reacted) {
return $t(
{