secure redirect

This commit is contained in:
Fabian Jakobs 2015-10-14 14:53:53 +00:00
parent 8224fb8c66
commit b0e10d15b5

9
node_modules/c9/string.js generated vendored
View File

@ -43,5 +43,14 @@ exports.repeat = function(str, times) {
exports.count = function(str, substr){
return str.split(substr).length - 1;
};
exports.endsWith = function(subjectString, searchString, position) {
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
position = subjectString.length;
}
position -= searchString.length;
var lastIndex = subjectString.indexOf(searchString, position);
return lastIndex !== -1 && lastIndex === position;
};
});