foundryvtt-reve-de-dragon/module/item.js

18 lines
416 B
JavaScript
Raw Normal View History

/* -------------------------------------------- */
export class RdDItem {
/* -------------------------------------------- */
static buildItemsClassification( items ) {
let itemsByType = {};
for (const item of items) {
let list = itemsByType[item.type];
if (!list) {
list = [];
itemsByType[item.type] = list;
}
list.push(item);
}
return itemsByType;
}
}