I can definitely see using .includes() to replace the multiple || OR statements in the first example. But what's going on with the next example? Where are those "type:" and "ObjectID" and "enum:" coming from? Is this a database schema?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store