subtitle-merger
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Subtitle Merger

No dependencies subtitle merger.

SRT support

Installation

npm

$ npm i subtitle-merger

Usage

Example of merging subtitles.

import { merge } from "subtitle";

const subOne = `
1
00:00:00,498 --> 00:00:02,827
Hello, this is an example.

`;
const subTwo = `
1
00:00:00,498 --> 00:00:02,827
こんにちは。これはサンプルです。

`;

// it will return a Subtitle object.
const mergedSubtitle = merge(subOne, subTwo);

Getting the merged content as a text:

mergedSubtitle.content;

// Output:
// 1
// 00:00:00,498 --> 00:00:02,827
// Hello, this is an example.
// こんにちは。これはサンプルです。

Getting the merged content as a Blob:

mergedSubtitle.blob;

/subtitle-merger/

    Package Sidebar

    Install

    npm i subtitle-merger

    Weekly Downloads

    3

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    8.89 kB

    Total Files

    10

    Last publish

    Collaborators

    • vineryap