I have the urge to slap my niece
Why would you slap her?
I do not want to, but my jealousy is getting the best of me.
If you are so angry with a child that you want to slap her, you should remove yourself from the situation. Slapping a child is assault, and you would be in trouble and probably have a lot of regret if you did it.
No, she is a brat. I will slap her so that she acts better,
There are other ways to correct bad behavior from a child.   Physical assault can scar them for life and cause worse problems down the road.