Subtitle.js Versions Save

Stream-based library for parsing and manipulating subtitle files

v4.1.2

2 years ago
  • Implement filter as a Transform stream to fix piping #77 by @marnusw

4.1.1

2 years ago
  • Remove decimals from ms

v4.0.1

3 years ago
  • Update README
  • Add tests for parser errors

v4.0.0

3 years ago
  • Fixes #6 by introducing the stream interface (parse, stringify and resync are now stream-based functions)
  • Add parseSync and stringifySync as synchronous version of parse and stringify
  • Add map and filter to manipulate the parse stream
  • Update the nodes tree so it can support more types than just a cue
  • Refactor the internals by creating the Parser and Formatter classes
  • Format types are now "SRT" and "WebVTT" instead of "srt" and "vtt"

v3.0.0

3 years ago
  • Rewrite the project with TypeScript
  • Fixes #43 and #39
  • Update the API to export only these functions:
    • parse(input: string): Caption[]
    • stringify(captions: Caption[], options?: { format: 'srt' | 'vtt }): string
    • resync(captions: Caption[], time: number): Caption[]
    • parseTimestamp(timestamp: string): number
    • parseTimestamps(timestamps: string): Timestamp
    • formatTimestamp(timestamp: number, options?: { format: 'srt' | 'vtt' }): string
  • parse supports optional indexes

v2.0.5

3 years ago
  • Remove zero-fill dependency (now subtitle.js has zero dependencies!
  • Rewrite and refactor tests with Jest
  • Add Prettier and remove Standard
  • Remove some devDependencies