Gathering detailed insights and metrics for humanize-duration-ts
Gathering detailed insights and metrics for humanize-duration-ts
Gathering detailed insights and metrics for humanize-duration-ts
Gathering detailed insights and metrics for humanize-duration-ts
npm install humanize-duration-ts
Typescript
Module System
TypeScript (97.66%)
JavaScript (2.34%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Unlicense License
24 Stars
58 Commits
6 Forks
3 Watchers
14 Branches
2 Contributors
Updated on May 20, 2024
Latest Version
2.1.1
Package Id
humanize-duration-ts@2.1.1
Unpacked Size
105.68 kB
Size
13.81 kB
File Count
11
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
361000 becomes "6 minutes, 1 second"
I have the time in milliseconds and I want it to become "30 minutes" or "3 days, 1 hour". Enter Humanize Duration!
This is the typescript version of the javascript libary "HumanizeDuration.js" The thank goes to: Evan Hahn (Github)
npm install humanize-duration-ts --save
Setup instance:
1 import { HumanizeDurationLanguage, HumanizeDuration } from 'humanize-duration-ts';
Usage:
1 langService: HumanizeDurationLanguage = new HumanizeDurationLanguage(); 2 humanizer: HumanizeDuration = new HumanizeDuration(this.langService); 3 this.humanizer.humanize(12345678);
1 const service = new HumanizeDuration(new HumanizeDurationLanguage()); 2 console.log(service.getSupportedLanguages()); 3 4 // LOG: ['ar', 'bg', 'ca', 'cs', 'da', 'de', 'el', 'en', 'es', 'et', 'fa', 'fi', 5 // 'fo', 'fr', 'hr', 'hu', 'id', 'is', 'it', 'ja', 'ko', 'lo', 'lt', 'lv', 6 // 'ms', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'uk', 'ur', 'sk', 'sv', 'tr', 7 // 'th', 'vi', 'zh_CN', 'zh_TW']
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/11 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
57 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More