import { getPiwikActivityQueue } from '@datahub/tracking/utils/piwik'; /** * Convenience function to get the activity queue * @returns {Array>} */ export const getQueue = (): Array> => getPiwikActivityQueue(); /** * Returns an iteratee to match an activityId string with a string found at the head position in a queue * @param {string} activityId * @returns {((arg: Array) => boolean)} */ export const findInQueue = (activityId: string): ((arg: Array) => boolean) => ([activityIdInQueue]: Array< string >): boolean => activityIdInQueue === activityId;