youtubei.js / Types / JsExtractor
Class: JsExtractor
Defined in: src/utils/javascript/JsExtractor.ts:61
Class responsible for extracting and emitting JavaScript code snippets based on analysis results from a JsAnalyzer
instance.
Constructors
Constructor
new JsExtractor(
analyzer
):JsExtractor
Defined in: src/utils/javascript/JsExtractor.ts:62
Parameters
analyzer
Returns
JsExtractor
Methods
buildScript()
buildScript(
config
):BuildScriptResult
Defined in: src/utils/javascript/JsExtractor.ts:320
Processes extracted matches from the analyzer, handles dependencies, predeclares variables as needed, and generates an IIFE-wrapped output string containing the code snippets and exported variables.
Parameters
config
Configuration options for the emitter.