
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@c8/joi-validator-promised
Advanced tools
A wrapper around Joi `validate` method which provides support for promises
A wrapper around Joi validate
method which provides support for promises
'use strict'
const Validator = require('@c8/joi-validator-promised')
const opts = {
abortEarly: true
}
const myValidator = new Validator(opts)
const joiSchema = {
id: Joi.number().min(1),
name: Joi.string()
}
const data = {
id: 2,
name: 'C8 Management'
}
// Using the promise
myValidator.validate(data, joiSchema).then(
(result) => {
//do something
},
(err) => {
throw new Validator.ValidationError('A validation error occurred')
}
)
// Validate Synchronously i.e. with the standard Joi validate method
let result = myValidator.validateSync(data, joiSchema)
//If there is no error
if (!result) {
// Do something
} else {
throw new Validator.ValidationError('A validation error occurred')
}
As this package is simply a wrapper around Joi validate
method, the opts
object that is passed to the constructor supports all Joi
options
FAQs
A wrapper around Joi `validate` method which provides support for promises
The npm package @c8/joi-validator-promised receives a total of 2 weekly downloads. As such, @c8/joi-validator-promised popularity was classified as not popular.
We found that @c8/joi-validator-promised 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.