Skip to content

Commit

Permalink
Merge branch 'feature/add-additional-functions' of github.com:Transit…
Browse files Browse the repository at this point in the history
…App/gtfsNodeLib into feature/add-additional-functions
  • Loading branch information
Léo Frachet committed Mar 15, 2018
2 parents 9dc5d27 + 404a2e3 commit de1a926
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion gtfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,13 @@ class Gtfs {
*/
getIndexedStops() { return getIndexedTable(this, 'stops'); }

/**
* Get the number of stops defined
*
* @returns {number}
*/
getNumberOfStops() { return getNumberOfItemsInTable(this, 'stops'); }

/**
* Get the stop using one of its child stopTime.
*
Expand Down Expand Up @@ -724,7 +731,7 @@ class Gtfs {
*
* @returns {number}
*/
getNumberOfTrips() { return getIndexedTable(this, 'trips').size; }
getNumberOfTrips() { return getNumberOfItemsInTable(this, 'trips'); }

/**
* Get a sample trip.
Expand Down Expand Up @@ -981,6 +988,13 @@ class Gtfs {
*/
getIndexedCalendars() { return getIndexedTable(this, 'calendar'); }

/**
* Get the number of calendar defined
*
* @returns {number}
*/
getNumberOfCalendars() { return getNumberOfItemsInTable(this, 'calendar'); }

/**
* Removes an calendar of the GTFS.
*
Expand Down

0 comments on commit de1a926

Please sign in to comment.