YEP_Z_PassiveCases

So I'm implementing a custom passive case for this plugin (the lunatic mode added before the following)
// -------------------------------
// Add new effects above this line
// -------------------------------

I wanted to ask if my code was correct since I was mostly just following the provided syntax...
Code:
} else if (data.match(/ONE[ ]HANDED)) {
  if (user.isActor()) {
    condition = !user.equips()[1];
  } else {
    condition = false;
}
So in the state notebox I would put:
JavaScript:
<Passive Condition Cases>
One Handed
</Passive Condition Cases>
Correct?
For this line:
JavaScript:
} else if (data.match(/ONE[ ]HANDED)) {
I would suggest this instead:
JavaScript:
} else if (data.match(/ONE HANDED/i)) {

Explanation: /ONE HANDED/i is a regular expression. (You forgot to put a / at the end of yours, which will cause an error.) It represents the exact sequence of characters "ONE HANDED". The i immediately after the expression is called a "flag": in this case, it means "case-insensitive", i.e. this will match anything like one handed, ONE HANDED, One Handed, etc. More details on regular expressions can be found here:
😤
@caethyril Thank you for pointing out my mistakes.

Original thread: https://forums.rpgmakerweb.com/threads/yep_z_passivecases.123615/