mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-17 16:38:18 +00:00
14 lines
271 B
JavaScript
14 lines
271 B
JavaScript
const isString = (a) => typeof a === 'string';
|
|
|
|
export default (value) => {
|
|
if (!isString(value))
|
|
return '';
|
|
|
|
if (value.length === 1)
|
|
return '';
|
|
|
|
if (value && !value.includes('/'))
|
|
return `/${value}`;
|
|
|
|
return value;
|
|
};
|