mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
secure redirect
This commit is contained in:
parent
8224fb8c66
commit
b0e10d15b5
9
node_modules/c9/string.js
generated
vendored
9
node_modules/c9/string.js
generated
vendored
@ -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;
|
||||
};
|
||||
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user