cloudcmd/server/prefixer.js
2017-01-26 10:28:31 +02:00

15 lines
250 B
JavaScript

'use strict';
module.exports = (value) => {
if (typeof value !== 'string')
return '';
if (value.length === 1)
return '';
if (value && !~value.indexOf('/'))
return '/' + value;
return value;
};