How to check is component deleted from library or not?


I’m trying to make a script to find all deprecated component instances in my document. During deprecation, we delete master component and publish the library.

I need to find all instances of such deleted components from my code.

In my code I got a correct componentNode of deleted component. But I was unable find any method or property to check is this master component deleted (remove and publish library) or not.

Is there any way?