Update utils.js

Add email test pattern, and startWith and endsWith methods