All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Add support for single digits in timestamps by @nbarnett
- Implement filter as a Transform stream to fix piping #77 by @marnusw
- Remove decimals from ms #73
- Ignore VTT comments #66
- Update README
- Add tests for parser errors
- Fixes #6 by introducing the stream interface (
parse
,stringify
andresync
are now stream-based functions) - Add
parseSync
andstringifySync
as synchronous version ofparse
andstringify
- Add
map
andfilter
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"
- 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
- Remove zero-fill dependency
- Rewrite and refactor tests with Jest
- Remove some devDependencies
- Add one-digit hour support #45 which fixes #31
- Add ESM module field to package.json
- Support separated texts in subtitles #36
- Support for WebVTT headers support #32
- Fix parsing of the text with the new line and whitespace at the end #25
toVttTime
andstringifyVtt
functions #24
- Fix broken tests #21
- Webpack instead of Browserify.
- Fix #18 and #19.
- ES2015 modules.
- Support for both SRT and WebVTT input strings #21
- Fix parsing of 00:00:00,000 timestamp #17
- Almost everything. Subtitle.js has a new API now.
- Code rewritten to ES6.
- Tests improved.
- Ensure
text
is an empty string instead ofnull
orundefined
, #15
- Normalize extra newlines, #44
- .npmignore
- .codeclimate.yml
- Additional tests.
- Code Coverage with coveralls.
- Changelog.
- Use AVA and nyc instead of Mocha, Chai and Istanbul.
- Improve code organization.
- Use NPM scripts instead of Make.
- Use
xtend
module instead ofunderscore
. - Change code style to Standard rules.
- Rename
stringfy
method tostringify
.
Old versions are undocumented.