Class JavaScriptExtractor
java.lang.Object
org.schabi.newpipe.extractor.utils.jsextractor.JavaScriptExtractor
Utility class for extracting functions from JavaScript code.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringmatchToClosingBrace(String jsCode, String start) Searches the given JavaScript code for the identifier of a function and returns its body.
-
Method Details
-
matchToClosingBrace
@Nonnull public static String matchToClosingBrace(String jsCode, String start) throws ParsingException Searches the given JavaScript code for the identifier of a function and returns its body.- Parameters:
jsCode- JavaScript codestart- start of the function (without the opening brace)- Returns:
- extracted code (opening brace + function + closing brace)
- Throws:
ParsingException
-