Strapi v4 sanitizeEntity

Solution 1:

In Strapi v4 it looks like it's replaced by sanitizeOutput function. It accepts the entity but looks like it needs context (ctx) to be passed too. It is not described anywhere in the official documentation though.