@media-manager/time-utils

Library with useful functions to deal with time issues. Time is gold.

Usage no npm install needed!

<script type="module">
  import mediaManagerTimeUtils from 'https://cdn.skypack.dev/@media-manager/time-utils';
</script>

README

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()



Code is Poetry.