Gathering detailed insights and metrics for convict-format-with-moment
Gathering detailed insights and metrics for convict-format-with-moment
Gathering detailed insights and metrics for convict-format-with-moment
Gathering detailed insights and metrics for convict-format-with-moment
Featureful configuration management library for Node.js
npm install convict-format-with-moment
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (99.12%)
Shell (0.88%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
2,367 Stars
622 Commits
139 Forks
47 Watchers
3 Branches
86 Contributors
Updated on Jul 18, 2025
Latest Version
6.2.0
Package Id
convict-format-with-moment@6.2.0
Size
1.88 kB
NPM Version
lerna/4.0.0/node@v12.18.2+x64 (linux)
Node Version
12.18.2
Published on
Jul 20, 2021
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
1
Formats duration
and timestamp
for convict with Moment.js.
1npm install convict-format-with-moment
An example config.js
file:
1const convict = require('convict'); 2const convict_format_with_moment = require('convict-format-with-moment'); 3 4// Add all formats 5convict.addFormats(convict_format_with_moment); 6 7// Or add only specific formats: 8// convict.addFormat(convict_format_with_moment.duration); 9// etc. 10 11// Define a schema 12var config = convict({ 13 format: { 14 format: 'duration' 15 }, 16 format: { 17 format: 'timestamp' 18 } 19});
Validation done through Moment.js:
duration
- milliseconds or a human readable string (e.g. 3000, "5 days")timestamp
- Unix timestamps or date strings recognized by Moment.jsConvict will automatically coerce environmental variables from strings to their proper types when importing them. For instance, values with the format int
, nat
, port
, or Number
will become numbers after a straight forward parseInt
or parseFloat
. duration
and timestamp
are also parse and converted into numbers, though they utilize Moment.js for date parsing.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 4/29 approved changesets -- score normalized to 1
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
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
30 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