Remove String.prototype modifications

Fix mcavage/node-ldapjs#257
This commit is contained in:
Patrick Mooney 2015-03-18 15:14:53 -05:00
parent 91f523af87
commit 773a1c6fd2
1 changed files with 0 additions and 17 deletions

View File

@ -46,23 +46,6 @@ var GUID_FORMAT_P = '({3}{2}{1}{0}-{5}{4}-{7}{6}-{8}{9}-{10}{11}{12}{13}{14}{15}
/* JSSTYLED */
var GUID_FORMAT_X = '{0x{3}{2}{1}{0},0x{5}{4},0x{7}{6},{0x{8},0x{9},0x{10},0x{11},0x{12},0x{13},0x{14},0x{15}}}';
/// Hack a few things we need (i.e., "monkey patch" the prototype)
if (!String.prototype.startsWith) {
String.prototype.startsWith = function (str) {
var re = new RegExp('^' + str);
return re.test(this);
};
}
if (!String.prototype.endsWith) {
String.prototype.endsWith = function (str) {
var re = new RegExp(str + '$');
return re.test(this);
};
}
///--- API