# @types/srtparsejs

> TypeScript definitions for srtparsejs

Latest version **1.0.2** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/srtparsejs
pnpm add @types/srtparsejs
yarn add @types/srtparsejs
bun add @types/srtparsejs
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-11-07 |
| First published | 2022-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51361 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/srtparsejs
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/srtparsejs
- npm.io page: https://npm.io/package/@types/srtparsejs

## Recent versions

- 1.0.2 (latest) — 2023-11-07
- 1.0.0 (ts4.0) — 2022-07-08
- 1.0.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/srtparsejs`

# Summary
This package contains type definitions for srtparsejs (https://github.com/Qiming-Liu/srtparse.js).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/srtparsejs.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/srtparsejs/index.d.ts)
````ts
export interface srtArray {
    id: string;
    startTime: string;
    endTime: string;
    text: string;
}

export interface srtPlayer {
    id: number;
    time: string;
    srtArray: srtArray;
    setText: (text: string) => void;
    update: (time: string) => void;
    getEndTime: () => string;
}

export function parse(srtText: string): srtArray[];
export function toSrt(data: srtArray[]): string;
export function toMS(timeString: string): number;
export function toTime(timeNumber: number): string;
export function compareTime(timeString: string, startString: string, endString: string): number;
export function getSrtArrayIndex(
    srtArray: srtArray[],
    startindex: number,
    endindex: number,
    timeString: string,
): number | undefined;
export function setPlayer(srtArray: srtArray[], setText: (text: string) => void): srtPlayer;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Qiming-Liu](https://github.com/Qiming-Liu).

---
_Source: https://npm.io/package/@types/srtparsejs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
