Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
hof-component-date
Advanced tools
A hof middleware for rendering and processing 3 part date fields
#HOF-Component-Date
A component for handling the rendering and processing of 3-input date fields used in HOF Applications.
##Usage
In your fields config:
const dateComponent = require('hof-component-date');
module.exports = {
'date-field': dateComponent('date-field', {
validate: ['required', 'before']
})
}
The above example will create a new date component with the key 'date-field'
and will apply the validators required
and before
(before today).
##Configuration
The following optional configuration options are supported:
validate {String|Array}
- validators to use on the processed date fieldtemplate
- an absolute path to an alternate template.dayOptional {Boolean}
- day defaults to 01
if omitted. Defaults to false
monthOptional {Boolean}
- month defaults to 01
if omitted. If true then also forces dayOptional
to be true. Defaults to false
##Labels
The three intermedate fields have fallback labels of Day, Month and Year, however custom labels can be used by including the translation at the following path:
fields.json
{
"field-name": {
"parts": {
"day": {
"label": "Custom Day Label"
},
"month": {
"label": "Custom Month Label"
},
"year": {
"label": "Custom Year Label"
}
}
}
}
FAQs
A hof middleware for rendering and processing 3 part date fields
We found that hof-component-date demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.