node_modules updated, buefy add to lib folder
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
var priorities = {};
|
||||
|
||||
export function addUnitPriority(unit, priority) {
|
||||
priorities[unit] = priority;
|
||||
}
|
||||
|
||||
export function getPrioritizedUnits(unitsObj) {
|
||||
var units = [];
|
||||
for (var u in unitsObj) {
|
||||
units.push({unit: u, priority: priorities[u]});
|
||||
}
|
||||
units.sort(function (a, b) {
|
||||
return a.priority - b.priority;
|
||||
});
|
||||
return units;
|
||||
}
|
||||
Reference in New Issue
Block a user