Handler class.
Creates a new handler.
The handler properties (name, build, detect, helper and parse)
name
build
detect
helper
parse
const handler = new Handler({ name: "ext", build: (captions: Caption[], options: BuildOptions): string => { // ... }, detect: (content: string): boolean | string => { // ... }, parse: (content: string, options: ParseOptions): Caption[] => { // ... },}); Copy
const handler = new Handler({ name: "ext", build: (captions: Caption[], options: BuildOptions): string => { // ... }, detect: (content: string): boolean | string => { // ... }, parse: (content: string, options: ParseOptions): Caption[] => { // ... },});
Optional
Handler class.