2.0.0 • Published 3 years ago

sec v2.0.0

Weekly downloads
105,149
License
MIT
Repository
github
Last release
3 years ago

sec

Convert a time string to seconds: '00:22:17'1337

Install

$ npm install sec

Usage

import toSeconds from 'sec';

// hours:minutes:seconds
toSeconds('00:22:17');
//=> 1337

toSeconds('22:17');
//=> 1337

toSeconds('17');
//=> 17