processRelations

Function

Convert an array of include into an array of PostRelation enum values.

Parameters

Parameter Type Default Notes
relations Optional string[] []

array of include (e.g. ["channel", "replies"]).

Returns

PostRelation[] with order of first appearance preserved and duplicates removed.


Function defined in packages/common/src/search/_internal/hubDiscussionsHelpers/processRelations.ts:17