geojson2gtfs
Version:
A tiny nodeJs cli app to transform geoJson files (describing an onDemand informal public transport routes) to its corresponding GTFS entities.
12 lines (10 loc) • 364 B
JavaScript
const fg = require('fast-glob');
module.exports = function filesSearcher(folderPath, extension) {
try {
const entries = fg.sync([`${folderPath}/*.${extension}`], { dot: false, onlyFiles: true});
return entries;
}
catch (error) {
throw `Error trying to list files with extension ${extension} in folder ${folderPath}`;
}
}