0.1.0-alpha.0 • Published 3 years ago

@media-manager/time-utils v0.1.0-alpha.0

Weekly downloads
-
License
GPL-2.0-or-later
Repository
github
Last release
3 years ago

Time utils

Library with useful functions to deal with time issues.

Installation

Install the module

npm install @media-manager/time-utils --save

This package assumes that your code will run in an ES2015+ environment. If you're using an environment that has limited or no support for ES2015+ such as IE browsers then using core-js will add polyfills for these methods.

API

Regular Expressions

timecodeRegExp

Helpers

convertSecondsToTimeCode()

import { convertSecondsToTimeCode } from '@media-manager/time-utils';

console.log( `200 seconds in time format: ${ convertSecondsToTimeCode( 200 ) }` );

convertTimeCodeToSeconds()