# youtube-duration

> Youtube Duration Formatter

Latest version **1.0.0** (published 2019-12-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install youtube-duration
pnpm add youtube-duration
yarn add youtube-duration
bun add youtube-duration
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-12-02 |
| First published | 2019-12-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ArsanDev |
| Maintainers | arsan |
| Keywords | Youtube, API, Video, Duration, Format |

## Links

- npm: https://www.npmjs.com/package/youtube-duration
- npm.io page: https://npm.io/package/youtube-duration

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-12-02

## README

## youtube-duration

Format video duration from Youtube Api V3

## How to Use

    npm i youtube-duration


**Format Duration**

    const ytDuration = require('youtube-duration')
    ytDuration.format('PT3M11S') // 3:11
    ytDuration.format('P1DT1M27S') // 24:01:27

**Convert to Second**

    const ytDuration = require('youtube-duration')
    ytDuration.toSecond('PT3M11S') // 191
    ytDuration.toSecond('P1DT1M27S') // 1527

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