mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-11 02:33:51 +00:00
20 lines
361 B
JavaScript
20 lines
361 B
JavaScript
import moment from 'moment';
|
|
|
|
export function formatPercent(value) {
|
|
return value ? `${(value * 100).toFixed(3)}%` : '';
|
|
}
|
|
|
|
export function formatPrice(value) {
|
|
return value ? value.toFixed(8) : '';
|
|
}
|
|
|
|
export function timestampms(ts) {
|
|
return moment(ts).format('YYYY-MM-DD hh:mm:ss');
|
|
}
|
|
|
|
export default {
|
|
formatPrice,
|
|
formatPercent,
|
|
timestampms,
|
|
};
|