mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 03:59:38 +00:00
* Prefer `c ? x : y` over `c && x || y` * Avoid unnecessary asssignment expressions * Prefer switch statements over object lookup tables * Add an .editorconfig * Fix style issues * Fix mentioned issues * remove dynamic require * Introduce esbuild as a build system * Add cross platform stream api * Replace 'fs' with custom cache api * Add cross platform crypto api * Add misc. dependencies * Create multi-platform tests * Update package-lock, Add build files * Pull from upstream * Fix linting issues, and update build files * Fix comments issues * Regenerate types, add source maps Co-authored-by: bob <bob.varioa@gmail.com>
27 lines
681 B
JavaScript
27 lines
681 B
JavaScript
'use strict';
|
|
|
|
const Parser = require('..');
|
|
|
|
class SectionList {
|
|
type = 'SectionList';
|
|
|
|
constructor(data) {
|
|
if (data.targetId) {
|
|
this.target_id = data.targetId;
|
|
}
|
|
this.contents = Parser.parse(data.contents);
|
|
|
|
if (data.continuations) {
|
|
if (data.continuations[0].nextContinuationData) {
|
|
this.continuation = data.continuations[0].nextContinuationData.continuation;
|
|
} else if (data.continuations[0].reloadContinuationData) {
|
|
this.continuation = data.continuations[0].reloadContinuationData.continuation;
|
|
}
|
|
}
|
|
if (data.header) {
|
|
this.header = Parser.parse(data.header);
|
|
}
|
|
}
|
|
}
|
|
|
|
module.exports = SectionList; |