# typescript-timecode

> A typescript timecode converter

Latest version **0.0.5** (published 2023-02-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install typescript-timecode
pnpm add typescript-timecode
yarn add typescript-timecode
bun add typescript-timecode
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2023-02-01 |
| First published | 2023-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Ijaz Ul Rehman |
| Maintainers | ijazulrehman |
| Keywords | timecode, utils, time, converter, utility |

## Links

- npm: https://www.npmjs.com/package/typescript-timecode
- Repository: https://github.com/ijazulrehman/typescript-timecode
- Issues: https://github.com/ijazulrehman/typescript-timecode/issues
- npm.io page: https://npm.io/package/typescript-timecode

## Alternatives

- [@js-joda/timezone](https://npm.io/package/@js-joda/timezone.md) — 383.4K weekly downloads
- [chartjs-adapter-moment](https://npm.io/package/chartjs-adapter-moment.md) — 210.8K weekly downloads
- [strftime](https://npm.io/package/strftime.md) — 171.2K weekly downloads
- [vue-flatpickr-component](https://npm.io/package/vue-flatpickr-component.md) — 115.8K weekly downloads
- [timepicker](https://npm.io/package/timepicker.md) — 51.0K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2023-02-01
- 0.0.4 — 2023-02-01
- 0.0.3 — 2023-02-01
- 0.0.2 — 2023-02-01
- 0.0.1 — 2023-02-01

## README

<a name="Timecode"></a>

# typscript-timecode

A typscript tool to convert timecodes

<div>
   <img alt="GitHub Workflow Status" src="https://github.com/ijazulrehman/typescript-timecode/actions/workflows/main.yml/badge.svg">
   <img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/ijazulrehman/typescript-timecode">
   <img alt="GitHub" src="https://img.shields.io/github/license/ijazulrehman/typescript-timecode">
</div>

## Installation

For npm users:

```bash
npm install typescript-timecode
```

For yarn users:

```bash
yarn add typescript-timecode
```

```typescript
import Timecode from "typescript-timecode";

// To convert millisecond to standard time code
const t1 = Timecode.MillisecondsToTime(320009); // t1 = "05:20";
//if need ms then pass separator
const t2 = Timecode.MillisecondsToTime(320009, "."); // t2 = "05:20.009";

// To convert millisecond to HH:MM:ss time code
const t3 = Timecode.MillisecondsToHHMMss(320009); // t3 = "00:05:20";

// To convert millisecond to HH:MM:ss.SSS time code
const t4 = Timecode.MillisecondsToHHMMssSSS(320009); // t4 = "00:05:20.009";

// To convert millisecond to HH:MM:ss.SSS time code
const t5 = Timecode.MillisecondsToHHMMssSSS(320009, ","); // t5 = "00:05:20,009";

// To convert millisecond to HH:MM:ss.SSS time code
const t6 = Timecode.MillisecondsToHHMMssSSS(320009, ":"); // t6 = "00:05:20:009";

// To convert a standard time code, HHMMss, and HHMMssSSS to milliseconds.
const ms1 = Timecode.TimetoMilliseconds("00:00:03.09"); // ms1 = 3009;
```

## Tests

To run them, just do:

```shell
npm run test
```

## Contributing

Any is welcomed. Just open a PR.

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