MCPcopy Index your code
hub / github.com/JavaCS3/xterm-player / parse

Function parse

src/CastParser.ts:8–21  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

6}
7
8export function parse(text: string): ICastObject {
9 const factories = [
10 AsciinemaCastParser,
11 TerminalizerParser
12 ]
13 for (let i = 0; i < factories.length; i++) {
14 const cls = factories[i]
15 try {
16 console.debug('trying ' + cls.name)
17 return (new cls()).parse(text)
18 } catch (e) { }
19 }
20 throw new Error('None of the available parsers can parse the cast')
21}
22
23export class AsciinemaCastParser implements ICastParser {
24 public parse(text: string): ICastObject {

Callers 2

innerFetchCastFunction · 0.90
CastParser.test.tsFile · 0.90

Calls 1

parseMethod · 0.65

Tested by

no test coverage detected