pretty-ms:将毫秒转换为人类可读的字符串

时间:2021-05-26 03:25:03
【文件属性】:
文件名称:pretty-ms:将毫秒转换为人类可读的字符串
文件大小:9KB
文件格式:ZIP
更新时间:2021-05-26 03:25:03
milliseconds npm-package humanize JavaScript 漂亮女士 将毫秒转换为人类可读的字符串: 1337000000 → 15d 11h 23m 20s 安装 $ npm install pretty-ms 用法 const prettyMilliseconds = require ( 'pretty-ms' ) ; prettyMilliseconds ( 1337000000 ) ; //=> '15d 11h 23m 20s' prettyMilliseconds ( 1337 ) ; //=> '1.3s' prettyMilliseconds ( 133 ) ; //=> '133ms' // `compact` option prettyMilliseconds ( 1337 , { compact : true } ) ; //=> '1s' // `verbose` option prettyMilliseconds (
【文件预览】:
pretty-ms-main
----.gitignore(23B)
----.github()
--------workflows()
--------funding.yml(91B)
----.gitattributes(19B)
----package.json(855B)
----index.test-d.ts(833B)
----readme.md(3KB)
----index.js(4KB)
----index.d.ts(3KB)
----test.js(14KB)
----.editorconfig(175B)
----license(1KB)
----.npmrc(19B)

网友评论