import {associatedCollectionsTags} from './associated-collections-tags'; export const isPdpTagFromCollection = ( collections: Array | null ): Array => { const tags: Array = new Array(); if (collections) { collections.forEach((collection: string) => { const foundTag = associatedCollectionsTags.find( (collectionTagPair: {name: string; tag: string}) => collectionTagPair.name === collection ); if (foundTag) { tags.push(foundTag.tag); } }); } return tags; };