# tc2s

> timecodes to seconds

Latest version **1.1.1** (published 2016-09-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install tc2s
pnpm add tc2s
yarn add tc2s
bun add tc2s
```

## 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.1.1 |
| Published | 2016-09-23 |
| First published | 2016-09-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | John Haugeland |
| Maintainers | stonecypher |
| Keywords | timecode, timecodes, to, seconds |

## Links

- npm: https://www.npmjs.com/package/tc2s
- Repository: https://github.com/StoneCypher/tc2s
- Homepage: https://github.com/StoneCypher/tc2s#readme
- Issues: https://github.com/StoneCypher/tc2s/issues
- npm.io page: https://npm.io/package/tc2s

## Dependencies (2)

- [babel](https://npm.io/package/babel.md) ^6.5.2
- [babel-core](https://npm.io/package/babel-core.md) ^6.14.0

## Alternatives

- [update-check](https://npm.io/package/update-check.md) — 4.0M weekly downloads
- [react-native-onesignal](https://npm.io/package/react-native-onesignal.md) — 134.5K weekly downloads
- [react-redux-toastr](https://npm.io/package/react-redux-toastr.md) — 33.7K weekly downloads
- [@nocobase/plugin-notification-manager](https://npm.io/package/@nocobase/plugin-notification-manager.md) — 2.0K weekly downloads
- [react-simple-toasts](https://npm.io/package/react-simple-toasts.md) — 1.9K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2016-09-23
- 1.1.0 — 2016-09-23
- 1.0.1 — 2016-09-23
- 1.0.0 — 2016-09-23
- 0.1.0 — 2016-09-23

## README

# tc2s
Convert timecodes to milliseconds, or a frame index - eg '1h27m45s' -> 5265000

## What?
This is a simple utility for making it easier to convert human-friendly timecodes to machine-friendly frame IDs, to facilitate machine generation of video from simple hand-writeable scripts.

```javascript
var tc = require('tc2s');

console.log( tc.to_ms('1h 27m 45s') );          // 5265000
console.log( tc.to_60_frames('1h 27m 45s') );   // 315900

console.log( tc.to_tick(1000, '1h 27m 45s') );  // 5265000
console.log( tc.to_tick(60,   '1h 27m 45s') );  // 315900
```

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