UNPKG

janky

Version:

Janus Interface

19 lines (14 loc) 449 B
import { RemoteFeedType } from "../types"; const remoteFeeds: RemoteFeedType[] = []; // Some where to keep perisistance class RemoteFeeds { public static setFeed(remoteFeed: RemoteFeedType) { remoteFeeds.push(remoteFeed); } public static getFeeds() { return remoteFeeds; } public static getUserFeed(id: number) { return remoteFeeds.filter(feed => feed.id === id); } }; export default RemoteFeeds;