cloudcmd/server/prefixer.js
2016-12-23 11:46:17 +02:00

15 lines
257 B
JavaScript

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