Skip to content

Commit

Permalink
Merge pull request #778 from ibi-group/add-is-transit-leg
Browse files Browse the repository at this point in the history
feat(core-utils): add isTransitLeg function that uses transitLeg prop
  • Loading branch information
daniel-heppner-ibigroup committed Sep 23, 2024
2 parents ea62427 + bf0af67 commit 8e19f3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core-utils/src/itinerary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export function getTransitModes(config: Config): string[] {
);
}

export function isTransitLeg(leg: Leg): boolean {
return leg.transitLeg;
}

export function isTransit(mode: string): boolean {
return transitModes.includes(mode) || mode === "TRANSIT";
}
Expand Down

0 comments on commit 8e19f3f

Please sign in to comment.