mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Minor fixes and polyfills
This commit is contained in:
parent
89a72a50cf
commit
feda4a9b67
7 changed files with 44 additions and 43 deletions
|
@ -1,33 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
define(
|
||||
[
|
||||
], function () {
|
||||
|
||||
return {
|
||||
|
||||
startsWith: function (str, starts) {
|
||||
if (starts === '') {
|
||||
return true;
|
||||
}
|
||||
if (str == null || starts == null) {
|
||||
return false;
|
||||
}
|
||||
str = String(str);
|
||||
starts = String(starts);
|
||||
return str.length >= starts.length && str.slice(0, starts.length) === starts;
|
||||
},
|
||||
|
||||
endsWith: function (str, ends) {
|
||||
if (ends === '') {
|
||||
return true;
|
||||
}
|
||||
if (str == null || ends == null) {
|
||||
return false;
|
||||
}
|
||||
str = String(str);
|
||||
ends = String(ends);
|
||||
return str.length >= ends.length && str.slice(str.length - ends.length) === ends;
|
||||
}
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue