mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
sugar kills (removed sugar.js)
Relative dates for next airing on posters and list (series) History time shows real time on tooltip
This commit is contained in:
23
UI/Shared/StringHelpers.js
Normal file
23
UI/Shared/StringHelpers.js
Normal file
@@ -0,0 +1,23 @@
|
||||
'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;
|
||||
}
|
||||
}
|
||||
});
|
Reference in New Issue
Block a user