
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
convict-format-with-moment
Advanced tools
Formats duration
and timestamp
for convict with Moment.js.
npm install convict-format-with-moment
An example config.js
file:
const convict = require('convict');
const convict_format_with_moment = require('convict-format-with-moment');
// Add all formats
convict.addFormats(convict_format_with_moment);
// Or add only specific formats:
// convict.addFormat(convict_format_with_moment.duration);
// etc.
// Define a schema
var config = convict({
format: {
format: 'duration'
},
format: {
format: 'timestamp'
}
});
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.
FAQs
Formats 'duration' and 'timestamp' for convict
The npm package convict-format-with-moment receives a total of 12,957 weekly downloads. As such, convict-format-with-moment popularity was classified as popular.
We found that convict-format-with-moment demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.