JSPM

mshumanize

1.0.01
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q25652F
    • License MIT

    Convert ms to human readable format with customization.

    Package Exports

    • mshumanize
    • mshumanize/index.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 (mshumanize) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    mshumanize

    Convert ms to human readable format with customization.

    const mshumanize = require('mshumanize');
    
    mshumanize(10000) // 0 day, 0 hour, 0 minutes, 10 seconds
    mshumanize(128332983) // 1 day, 11 hour, 38 minutes, 52 seconds
    mshumanize(102273, { separator: "|" }) // 0 day|0 hour|1 minutes|42 seconds
    mshumanize(188372, { day: "d", hour: "h", minutes: "m", seconds: "s" }) // 0d, 0h, 3m, 8s