You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
894 B
36 lines
894 B
|
4 years ago
|
import events from './events.json' assert { type: 'json' };
|
||
|
|
|
||
|
|
const dl = '¤';
|
||
|
|
|
||
|
|
console.log(
|
||
|
|
`canceled${dl}created${dl}draft${dl}end${dl}facebook_id${dl}host${dl}id${dl}location${dl}name${dl}start${dl}ticket_url${dl}updated`
|
||
|
|
);
|
||
|
|
|
||
|
|
events.forEach(
|
||
|
|
({
|
||
|
|
canceled,
|
||
|
|
created,
|
||
|
|
draft,
|
||
|
|
end,
|
||
|
|
facebook_id,
|
||
|
|
host,
|
||
|
|
id,
|
||
|
|
location,
|
||
|
|
name,
|
||
|
|
start,
|
||
|
|
ticket_url,
|
||
|
|
updated
|
||
|
|
}) => {
|
||
|
|
const line = `${canceled}${dl}${created}${dl}${draft}${dl}${end}${dl}${facebook_id}${dl}${host}${dl}${id}${dl}${location}${dl}${name}${dl}${start}${dl}${ticket_url}${dl}${updated}`;
|
||
|
|
|
||
|
|
if (line.split(`${dl}`).length != 12) {
|
||
|
|
console.error(id, name);
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
console.log(
|
||
|
|
`${canceled}${dl}${created}${dl}${draft}${dl}${end}${dl}${facebook_id}${dl}${host}${dl}${id}${dl}${location}${dl}${name}${dl}${start}${dl}${ticket_url}${dl}${updated}`
|
||
|
|
);
|
||
|
|
}
|
||
|
|
);
|