Underscore.js _.map() to native Array.map() (optional with Object.entries/values)

This commit is contained in:
djmaze 2020-07-22 20:09:31 +02:00
parent 032fa8c736
commit a82575a830
27 changed files with 68 additions and 78 deletions

View file

@ -6,7 +6,7 @@ class IdentityUserStore {
this.identities = ko.observableArray([]);
this.identities.loading = ko.observable(false).extend({ throttle: 100 });
this.identitiesIDS = ko.computed(() => _.compact(_.map(this.identities(), (item) => (item ? item.id : null))));
this.identitiesIDS = ko.computed(() => _.compact(this.identities().map(item => (item ? item.id : null))));
}
}