blob: d27e675dec6cb3485c0aa03a77fddfed82fc2293 [file] [edit]
const regExp = /^\/(?:event\/([^/]+)(?:$()|\/comments$())|map\/([^/]+)\/events$()|static(?:|\/.*)$()|user\/lookup\/(?:email\/([^/]+)$()|username\/([^/]+)$()))/;
const match = '/user/lookup/username/hey'.match(regExp);
function test(array) {
return array.includes('hey');
}
noInline(test);
for (let i = 0; i < 1e6; i++) {
if (!test(match))
throw new Error("bad");
}