JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 16
  • Score
    100M100P100Q33665F
  • License Apache-2.0

A package to convert milliseconds to different units

Package Exports

  • mstotime.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mstotime.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Installation

Node.js 12.0.0 or newer is required.
npm install mstotime.js

Example usage

const msToTime = require("mstotime.js")

var time = msToTime.seconds(10000 , false); 
// hours | minutes | seconds // true : float & false : integer

console.log(time);

output : 10

New Function

** Full time **

const mstotime = require("msToTime.js");

var resultFloat = mstotime.full(1000 , true);
var resultInteger = mstotime.full(1000 , false);

console.log("Float : " + resultFloat + " | Int : " + resultInteger);

output :

Float : 00.0002777777777777778:00.016666666666666666:01 | Int : 0:0:1