mirror of
				https://github.com/public-transport/db-vendo-client.git
				synced 2025-10-31 16:16:32 +02:00 
			
		
		
		
	import db-hafas-stations on demand
This commit is contained in:
		
							parent
							
								
									a9eacd20b5
								
							
						
					
					
						commit
						47e1285600
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		
							
								
								
									
										4
									
								
								index.js
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								index.js
									
										
									
									
									
								
							|  | @ -1,6 +1,5 @@ | |||
| import isObj from 'lodash/isObject.js'; | ||||
| import distance from 'gps-distance'; | ||||
| import readStations from 'db-hafas-stations'; | ||||
| 
 | ||||
| import {defaultProfile} from './lib/default-profile.js'; | ||||
| import {validateProfile} from './lib/validate-profile.js'; | ||||
|  | @ -27,7 +26,8 @@ const validateLocation = (loc, name = 'location') => { | |||
| 	} | ||||
| }; | ||||
| 
 | ||||
| const loadEnrichedStationData = (profile) => new Promise((resolve, reject) => { | ||||
| const loadEnrichedStationData = (profile) => new Promise(async (resolve, reject) => { | ||||
| 	const { default: readStations} = await import('db-hafas-stations'); | ||||
| 	const items = {}; | ||||
| 	readStations.full() | ||||
| 		.on('data', (station) => { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue