mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-07-03 17:38:23 +00:00
refactor!: finish parser migration
Finally! :) This removes all code related to the old parser. #65
This commit is contained in:
21
lib/parser/classes/VerticalList.js
Normal file
21
lib/parser/classes/VerticalList.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
const Parser = require('..');
|
||||
const Text = require('./Text');
|
||||
|
||||
class VerticalList {
|
||||
type = 'VerticalList';
|
||||
|
||||
constructor(data) {
|
||||
this.items = Parser.parse(data.items);
|
||||
this.collapsed_item_count = data.collapsedItemCount;
|
||||
this.collapsed_state_button_text = new Text(data.collapsedStateButtonText);
|
||||
}
|
||||
|
||||
// XXX: alias for consistency
|
||||
get contents() {
|
||||
return this.items;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = VerticalList;
|
||||
Reference in New Issue
Block a user