parse-ms

4.0.0last stable release 1 year ago
Complexity Score
Low
Open Issues
N/A
Dependent Projects
101
Weekly Downloadsglobal
8,661,165

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

parse-ms

Parse milliseconds into an object

Install

npm install parse-ms

Usage

import parseMilliseconds from 'parse-ms';

parseMilliseconds(1337000001);
/*
{
    days: 15,
    hours: 11,
    minutes: 23,
    seconds: 20,
    milliseconds: 1,
    microseconds: 0,
    nanoseconds: 0
}
*/

parseMilliseconds(1337000001n);
/*
{
    days: 15n,
    hours: 11n,
    minutes: 23n,
    seconds: 20n,
    milliseconds: 1n,
    microseconds: 0n,
    nanoseconds: 0n
}
*/

Related

  • to-milliseconds - The inverse of this module
  • pretty-ms - Convert milliseconds to a human readable string

Dependencies

No runtime dependency information found for this package.

CVE IssuesActive
0
Scorecards Score
4.20
Test Coverage
No Data
Follows Semver
Yes
Github Stars
119
Dependenciestotal
3
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No Data
Repo Audits
No Data

Learn how to distribute parse-ms in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install parse-ms
Processing...
Done

9 Releases

NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.