We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aujourd'hui nous avons une fonction getSectionsInfo qui nous retourne :
getSectionsInfo
return { id: feature.id, mode: getFeatureMode(feature), distance: get(feature, 'properties.distance'), // in meters duration: get(feature, 'properties.duration'), // in seconds startDate: get(feature, 'properties.start_fmt_time'), endDate: get(feature, 'properties.end_fmt_time'), averageSpeed: speeds ? averageSpeedKmH(speeds) : undefined // in km/h }
Et une autre getSectionsFormatedInfo qui nous retourne :
getSectionsFormatedInfo
const sections = getSectionsInfo(trip) return sections.map(section => { return { ...section, distance: `${formatDistance(section.distance)}`, duration: `${humanizeDuration(section.duration * 1000, { ... })}`, averageSpeed: `${Math.round(section.averageSpeed)} km/h` } })
Je propose les points d'améliorations suivant :
Fonction getSectionsInfo :
averageSpeed
speeds
mode
manualMode
sensedMode
Fonction getSectionsFormatedInfo :
startDate: isValidDate(new Date(section.startDate)) ? startDate : null, endDate: isValidDate(new Date(section.startDate)) ? endDate : null, mode: getFeatureMode(section.manualMode, section.sensedMode),
Ca demandera certainement quelques "petits" refacto supplémentaires, mais je pense qu'il serait plus sage de
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Aujourd'hui nous avons une fonction
getSectionsInfo
qui nous retourne :Et une autre
getSectionsFormatedInfo
qui nous retourne :Je propose les points d'améliorations suivant :
Fonction
getSectionsInfo
:averageSpeed
devrait être remplacée parspeeds
mode
devrait être remplacée parmanualMode
&sensedMode
Fonction
getSectionsFormatedInfo
:averageSpeed
) :Ca demandera certainement quelques "petits" refacto supplémentaires, mais je pense qu'il serait plus sage de
mode
)The text was updated successfully, but these errors were encountered: