mirror of
https://github.com/iptv-org/database.git
synced 2025-05-09 19:20:01 -04:00
Update scripts
This commit is contained in:
parent
37b4197fb2
commit
6244ba7adb
54 changed files with 2020 additions and 1145 deletions
|
@ -30,9 +30,12 @@ const opts = {
|
|||
|
||||
export class CSVParser {
|
||||
async parse(data: string): Promise<Collection> {
|
||||
const items = await csv2json(opts).fromString(data)
|
||||
const parsed = await csv2json(opts).fromString(data)
|
||||
const rows = parsed.map((data, i) => {
|
||||
return { line: i + 2, data }
|
||||
})
|
||||
|
||||
return new Collection(items)
|
||||
return new Collection(rows)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue