Sha256: afa86ce3287e2e51d1356c4af1a077c6f446c506591703a7ffe2b19351357c3b
Contents?: true
Size: 594 Bytes
Versions: 119
Compression:
Stored size: 594 Bytes
Contents
// eslint-disable-next-line import/prefer-default-export export const filterRHSubscriptions = subscriptions => subscriptions.filter(sub => sub.available >= 0 && sub.upstream_pool_id); export const selectSubscriptionsQuantitiesFromResponse = ({ results }) => { const quantityMap = {}; results.forEach(pool => pool.local_pool_ids && pool.local_pool_ids.forEach((localId) => { if (quantityMap[localId]) { quantityMap[localId] += pool.available; } else { quantityMap[localId] = pool.available; } })); return quantityMap; };
Version data entries
119 entries across 119 versions & 1 rubygems