Need review on some pull requests

So, I was just trying to contribute to my favorite library, and submitted two PRs two days ago, one is a simple bugfix, while the other is about a feature which I thought to be missing from p5.js as of now. So, If someone has some time to spare, can he/she please review my PR? Every feedback or criticism is always helpful :slight_smile:.