as-convert-seconds
v1.0.0
Published
Convert-Seconds To Hours, Minutes, and Seconds For AssemblyScript
Downloads
0
Readme
Convert-Seconds
Convert Seconds To Hours, Minutes, And Seconds
About
- AssemblyScript Compatible
- Isomorphic (Browser / Node)
Installation
~ npm install as-convert-seconds --save
Usage
Basic Usage
import { convertSeconds } from 'as-convert-seconds'
const formatted = convertSeconds('4923')
//=> Array<number> [Hours, Minutes, Seconds]
console.log('Hours:' + formatted[0])
// 1h
console.log('Minutes:' + formatted[1])
// 22m
console.log('Seconds:' + formatted[2])
// 3s
API
convertSeconds(seconds: string) -->> Array
Convert Seconds To Hours, Minutes, And Seconds And Return An Array In The Same Order. (hr, mim, sec)