refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with functions which work similarily but aren't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
@@ -48,8 +48,8 @@ describe('ArrayWithExactContents', function() {
|
||||
if (
|
||||
typeof a == 'string' &&
|
||||
typeof b == 'string' &&
|
||||
a.substr(0, 3) == 'foo' &&
|
||||
b.substr(0, 3) == 'foo'
|
||||
a.slice(0, 3) == 'foo' &&
|
||||
b.slice(0, 3) == 'foo'
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user