mobility-toolbox-js
Version:
Toolbox for JavaScript applications in the domains of mobility and logistics.
13 lines (12 loc) • 891 B
TypeScript
import type { RealtimeTrajectory } from '../../types';
/**
* Return a filter functions based on some parameters of a vehicle.
*
* @param {string|Array<string>} line - A list of vehicle's name to filter. Names can be separated by a comma. Ex: 'S1,S2,S3'
* @param {string|Array<string} route - A list of vehicle's route (contained in route_identifier property) to filter. Indentifiers can be separated by a comma. Ex: 'id1,id2,id3'
* @param {string|Array<string} operator A list of vehicle's operator to filter. Operators can be separated by a comma. Ex: 'SBB,DB'
* @param {Regexp} regexLine - A regex aplly of vehcile's name.
* @private
*/
declare const createRealtimeFilters: (line: string | string[], route: string | string[], operator: string | string[], regexLine: string | string[]) => ((trajectory: RealtimeTrajectory) => boolean) | null;
export default createRealtimeFilters;