Add console.log for _staffLDB (Transformed data)
Signed-off-by: Fred Boniface <fred@fjla.uk>
This commit is contained in:
parent
0673637fa3
commit
ae1a467c97
@ -71,6 +71,7 @@ async function arrDepBoardStaff(CRS) {
|
||||
try {
|
||||
const _staffLdb = staffStationTransform(result)
|
||||
console.log("Transformation Test Successful")
|
||||
console.log(JSON.stringify(_staffLdb))
|
||||
} catch (err) {
|
||||
console.log("Transformation Test Failed: " + err)
|
||||
}
|
||||
|
@ -29,12 +29,10 @@ export function transform(input: any): StaffLdb | null {
|
||||
}
|
||||
|
||||
function transformDateTime(input: string): Date {
|
||||
console.debug(`staffStation.transformDateTime Input: ${input}`)
|
||||
return new Date(input)
|
||||
}
|
||||
|
||||
function transformNrcc(input: any): NrccMessage[] {
|
||||
console.debug(`staffStations.transformNrcc: Running`)
|
||||
let output: NrccMessage[] = []
|
||||
let messages = input
|
||||
if (!Array.isArray(input?.message)) {
|
||||
@ -51,7 +49,6 @@ function transformNrcc(input: any): NrccMessage[] {
|
||||
}
|
||||
|
||||
function transformTrainServices(input: any): TrainServices[] {
|
||||
console.debug(`staffStation.transformTrainServices running`)
|
||||
let services: any = input?.service
|
||||
let output: TrainServices[] = []
|
||||
if (services === undefined) {
|
||||
@ -91,7 +88,6 @@ function transformTrainServices(input: any): TrainServices[] {
|
||||
}
|
||||
|
||||
function transformLocation(input: any): ServiceLocation[] {
|
||||
console.debug(`staffStation.transformLocation running`)
|
||||
let output: ServiceLocation[] = []
|
||||
let locations: any[] = input.location
|
||||
if (!Array.isArray(input.location)) {
|
||||
@ -124,7 +120,6 @@ export function calculateLength(input: any): number | undefined {
|
||||
}
|
||||
|
||||
function transformUnspecifiedDateTime(input: string): Date | undefined {
|
||||
console.debug(`staffStation.transformUnspecifiedDateTime running`)
|
||||
if (!input) {
|
||||
return undefined
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user