chore(prefixer) es-2015-ify

This commit is contained in:
coderaiser 2016-12-19 17:34:43 +02:00
parent 7bc51655b9
commit 86d1b4929e

View file

@ -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;
};