mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Add more strict rules (eslint)
This commit is contained in:
parent
b43bb17cdb
commit
52e2698cdf
38 changed files with 488 additions and 434 deletions
|
|
@ -250,10 +250,11 @@ EmailModel.prototype.mailsoParse = function($sEmailAddress)
|
|||
|
||||
var
|
||||
substr = function(str, start, len) {
|
||||
str += '';
|
||||
str = Utils.pString(str);
|
||||
var end = str.length;
|
||||
|
||||
if (0 > start) {
|
||||
if (0 > start)
|
||||
{
|
||||
start += end;
|
||||
}
|
||||
|
||||
|
|
@ -263,11 +264,15 @@ EmailModel.prototype.mailsoParse = function($sEmailAddress)
|
|||
},
|
||||
|
||||
substrReplace = function(str, replace, start, length) {
|
||||
if (0 > start) {
|
||||
str = Utils.pString(str);
|
||||
if (0 > start)
|
||||
{
|
||||
start += str.length;
|
||||
}
|
||||
length = 'undefined' === typeof length ? length : str.length;
|
||||
if (0 > length) {
|
||||
|
||||
length = 'undefined' !== typeof length ? length : str.length;
|
||||
if (0 > length)
|
||||
{
|
||||
length = length + str.length - start;
|
||||
}
|
||||
return str.slice(0, start) + replace.substr(0, length) + replace.slice(length) + str.slice(start + length);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue