ecency-mobile/src/utils/settings.js

15 lines
364 B
JavaScript
Raw Normal View History

2019-01-16 11:05:51 +03:00
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;
};