Syntax to check if a state is applied [Yanfly Skill Core]

Ok I'm using Yanfly's Skill core and my goal is to have a skill requirement met when a skill is applied to the user.

This is some default code for a conditional that is provided by Yanfly in the help menu.

<Custom Requirement>
if ($gameParty.gold() > 1000) {
value = true;
} else {
value = false;
}
</Custom Requirement>

What I'd like to do is check if a state ID is present on the battler casting the skill. Can anyone help me out with what the Javascript syntax would be?
For example: value = true when state ID = 20.
(I've tried various ways using isStateAffected() ? but I just don't know enough 🙁

Thanks for anyone that might be able to help!
<Custom Requirement>
value = user.isStateAffected(STATE_ID);
</Custom Requirement>
@waynee95 thank you so much!

I am slowly but surely learning my way around enough javascript to be really dangerous. I appreciate your help!

Original thread: https://forums.rpgmakerweb.com/threads/syntax-to-check-if-a-state-is-applied-yanfly-skill-core.79138/