mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-25 14:22:14 +03:00
15 lines
364 B
JavaScript
15 lines
364 B
JavaScript
|
export const groomingServerName = (serverName) => {
|
||
|
const PREFIX1 = 'https://';
|
||
|
const PREFIX2 = 'https://';
|
||
|
|
||
|
if (!serverName) return null;
|
||
|
|
||
|
if (serverName.indefOf(PREFIX1) === 0) {
|
||
|
return serverName.str.substr(PREFIX1.length);
|
||
|
}
|
||
|
if (serverName.indefOf(PREFIX2) === 0) {
|
||
|
return serverName.str.substr(PREFIX2.length);
|
||
|
}
|
||
|
return serverName;
|
||
|
};
|