|
|
|
@ -18,9 +18,10 @@ export default { |
|
|
|
|
}, |
|
|
|
|
shortenHexData: function (data) { |
|
|
|
|
if (!data) return '' |
|
|
|
|
if (data.length < 5) return data |
|
|
|
|
var sliceLen = 5 |
|
|
|
|
var len = data.length |
|
|
|
|
return data.slice(0, 5) + '...' + data.slice(len - 5, len) |
|
|
|
|
if (len < sliceLen * 2) return data |
|
|
|
|
return data.slice(0, sliceLen) + '...' + data.slice(len - sliceLen, len) |
|
|
|
|
}, |
|
|
|
|
createNonClashingNameWithPrefix (name, fileProvider, prefix, cb) { |
|
|
|
|
if (!name) name = 'Undefined' |
|
|
|
|