How to identify third party cookie in javascript [duplicate]

I am writing a code to identify which third party cookies might get affected after chrome third party cookie phaseout.

Is there a way to get the third party cookies in javascript?
What and all attributes should I consider to say that cookie will be affected by chrome third party cookie phaseout??

I might probably have to consider sameSite attribute and what else?