mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
16 lines
288 B
JavaScript
16 lines
288 B
JavaScript
'use strict';
|
|
|
|
const isString = (a) => typeof a === 'string';
|
|
|
|
module.exports = (value) => {
|
|
if (!isString(value))
|
|
return '';
|
|
|
|
if (value.length === 1)
|
|
return '';
|
|
|
|
if (value && !value.includes('/'))
|
|
return `/${value}`;
|
|
|
|
return value;
|
|
};
|