Javascript String startsWith(string)
String.prototype.startsWith = function (string) { var index = arguments.length < 2 ? 0 : arguments[1]; return this.slice(index).indexOf(string) === 0; };