mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-20 03:42:10 +03:00
15 lines
261 B
JavaScript
15 lines
261 B
JavaScript
export default (strVal) => {
|
|
if (typeof strVal !== 'string') {
|
|
// console.log(strVal);
|
|
return {
|
|
amount: 0,
|
|
symbol: '',
|
|
};
|
|
}
|
|
const sp = strVal.split(' ');
|
|
return {
|
|
amount: parseFloat(sp[0]),
|
|
symbol: Symbol[sp[1]],
|
|
};
|
|
};
|