mirror of
https://github.com/remoteintech/remote-jobs
synced 2024-11-10 06:34:22 +00:00
refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
This commit is contained in:
parent
9116b2d2a7
commit
4a7dc6ce3b
1 changed files with 2 additions and 2 deletions
|
@ -59,8 +59,8 @@ function toIdentifierCase( text ) {
|
|||
return word.toLowerCase();
|
||||
}
|
||||
return (
|
||||
word.substr( 0, 1 ).toUpperCase()
|
||||
+ word.substr( 1 ).toLowerCase()
|
||||
word.slice( 0, 1 ).toUpperCase()
|
||||
+ word.slice( 1 ).toLowerCase()
|
||||
);
|
||||
} )
|
||||
.join( '' );
|
||||
|
|
Loading…
Reference in a new issue