1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

replacing the deprecated substr() with slice()

Signed-off-by: Gaurav Agrawal <gauravag.1005@gmail.com>
This commit is contained in:
Gaurav Agrawal 2022-01-13 21:29:49 +05:30
parent 0be1ab4ce0
commit b48f237a66
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ export class CustomResourceDefinition extends KubeObject {
getResourceTitle() {
const name = this.getPluralName();
return name[0].toUpperCase() + name.substr(1);
return name[0].toUpperCase() + name.slice(1);
}
getGroup() {

View File

@ -22,7 +22,7 @@
// Create random system name
export function getRandId({ prefix = "", suffix = "", sep = "_" } = {}) {
const randId = () => Math.random().toString(16).substr(2);
const randId = () => Math.random().toString(16).slice(2);
return [prefix, randId(), suffix].filter(s => s).join(sep);
}