mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Underscore.js _.map() to native Array.map() (optional with Object.entries/values)
This commit is contained in:
parent
032fa8c736
commit
a82575a830
27 changed files with 68 additions and 78 deletions
|
|
@ -202,8 +202,7 @@ class MessageModel extends AbstractModel {
|
|||
getEmails(properties) {
|
||||
return _.compact(
|
||||
_.uniq(
|
||||
_.map(
|
||||
_.reduce(properties, (carry, property) => carry.concat(this[property]), []),
|
||||
_.reduce(properties, (carry, property) => carry.concat(this[property]), []).map(
|
||||
(oItem) => (oItem ? oItem.email : '')
|
||||
)
|
||||
)
|
||||
|
|
@ -628,7 +627,7 @@ class MessageModel extends AbstractModel {
|
|||
* @returns {string}
|
||||
*/
|
||||
attachmentsToStringLine() {
|
||||
const attachLines = _.map(this.attachments(), (item) => item.fileName + ' (' + item.friendlySize + ')');
|
||||
const attachLines = this.attachments().map(item => item.fileName + ' (' + item.friendlySize + ')');
|
||||
return attachLines && 0 < attachLines.length ? attachLines.join(', ') : '';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue