
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Clean parameters and define defaults.
npm install caretaker
var caretaker = require('caretaker')
var cleaned = caretaker.clean(valid, params)
Valid is an object containing keys with an options object. Each parameter is parsed by either opt.type field or typeof opt.default (supports string, number, boolean, or 'default'). If a parameter is undefined, opt.default will be used, otherwise not included in the cleaned object. Also available are opt.required and opt.match for strings.
The caretaker.clean() function returns an cleaned object with a status. If cleaned.status === 'ok', cleaned.params contains the resulting parameters. Otherwise cleaned.errors will contain errors genereated by either opts.required, opts.match or a non-parsing value.
var valid = {
num: { default: 10 },
str: { type: 'string', match: /^([a-z]{1,})$/ },
boo: { type: 'boolean', required: true }
}
var cleaned = caretaker.clean(valid, { str: 'a', boo: 1 })
// cleaned = { status: 'ok', params: { num: 10, str: 'a', boo: true } }
cleaned = caretaker.clean(valid, { str: '9' })
// cleaned = { status: 'error', errors: { str: 'is not allowed', boo: 'is required' } }
FAQs
lean parameters and define defaults.
The npm package caretaker receives a total of 2 weekly downloads. As such, caretaker popularity was classified as not popular.
We found that caretaker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.