22 lines
413 B
JavaScript
22 lines
413 B
JavaScript
|
const stations = require('db-stations')
|
||
|
const fs = require('fs');
|
||
|
|
||
|
var ds100list = {};
|
||
|
|
||
|
stations.full()
|
||
|
.on('data',function(station){
|
||
|
var stuff = [];
|
||
|
station.ril100Identifiers.forEach(element => {
|
||
|
stuff.push(element.rilIdentifier)
|
||
|
})
|
||
|
|
||
|
if (stuff.length === 0) return;
|
||
|
|
||
|
ds100list[station.id] = stuff.join(', ');
|
||
|
})
|
||
|
.on('end',function(){
|
||
|
|
||
|
fs.writeFile("ds100.json", JSON.stringify(ds100list), () => {})
|
||
|
|
||
|
});
|