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/Grid.js
Normal file
21
lib/parser/classes/Grid.js
Normal file
@@ -0,0 +1,21 @@
|
||||
'use strict';
|
||||
|
||||
const Parser = require('..');
|
||||
|
||||
class Grid {
|
||||
type = 'Grid';
|
||||
|
||||
constructor(data) {
|
||||
this.items = Parser.parse(data.items);
|
||||
this.is_collapsible = data.isCollapsible;
|
||||
this.visible_row_count = data.visibleRowCount;
|
||||
this.target_id = data.targetId;
|
||||
}
|
||||
|
||||
// XXX: alias for consistency
|
||||
get contents() {
|
||||
return this.items;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Grid;
|
||||
Reference in New Issue
Block a user