Files
fredy/test/mocks/mockStore.js
Christian Kellner 2c5eceb0c1 Making Fredy an ESM project (#70)
Making Fredy an ESM project
2023-03-13 13:42:43 +01:00

9 lines
273 B
JavaScript

const db = {};
export const setKnownListings = (jobKey, providerId, listings) => {
if (!Array.isArray(listings)) throw Error('Not a valid array');
db[providerId] = listings;
};
export const getKnownListings = (jobKey, providerId) => {
return db[providerId] || [];
};