mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-21 02:29:23 +00:00
chore(prefixer) es-2015-ify
This commit is contained in:
parent
7bc51655b9
commit
86d1b4929e
1 changed files with 10 additions and 6 deletions
|
|
@ -1,11 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = function(value) {
|
||||
if (typeof value === 'string')
|
||||
if (value && !~value.indexOf('/'))
|
||||
value = '/' + value;
|
||||
else if (value.length === 1)
|
||||
value = '';
|
||||
module.exports = (value) => {
|
||||
if (typeof value !== 'string')
|
||||
return value;
|
||||
|
||||
if (value && !~value.indexOf('/'))
|
||||
return '/' + value;
|
||||
|
||||
if (value.length === 1)
|
||||
return '';
|
||||
|
||||
return value;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue