Skip to content

Commit

Permalink
release v4.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gsantiago committed Sep 19, 2020
1 parent 5d33f32 commit 20fdefe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [4.0.0] - 2020-09-XX
## [4.0.1] - 2020-09-19
- Update README
- Add tests for parser errors

## [4.0.0] - 2020-09-19
- 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
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ inputStream
.pipe(outputStream)
```

Besides the stream functions, this module also provides synchronous functions like `parseSync` and `stringifySync`. However, you should avoid them and rather use the stream-based functions for better performance:
Besides the stream functions, this module also provides synchronous functions like `parseSync` and `stringifySync`. However, you should avoid them and use the stream-based functions for better performance:

```ts
import { parseSync, stringifySync } from 'subtitle'
Expand Down Expand Up @@ -116,13 +116,13 @@ inputStream
.on('finish', () => console.log('parser has finished'))
```

Check out the [Examples](#examples) section for more examples.
Check out the [Examples](#examples) section for more use cases.

### parseSync

- `parseSync(input: string): Node[]`

> **NOTE**: For better perfomance, consider to use the stream-based `parse` function
> **NOTE**: For better perfomance, consider using the stream-based `parse` function
It receives a string containing a SRT or VTT content and returns
an array of nodes:
Expand Down Expand Up @@ -172,13 +172,13 @@ inputStream
.pipe(stringify({ format: 'WebVTT' }))
```

Check out the [Examples](#examples) section for more examples.
Check out the [Examples](#examples) section for more use cases.

### stringifySync

- `stringify(nodes: Node[], options: { format: 'SRT' | 'vtt }): string`

> **NOTE**: For better perfomance, consider to use the stream-based `stringify` function
> **NOTE**: For better perfomance, consider using the stream-based `stringify` function
It receives an array of captions and returns a string in SRT (default), but it also supports VTT format through the options.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "subtitle",
"version": "4.0.0",
"version": "4.0.1",
"description": "Stream-based library for parsing and manipulating subtitles",
"repository": {
"type": "git",
Expand Down

0 comments on commit 20fdefe

Please sign in to comment.