
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@lpgroup/yup
Advanced tools
Collection of yup validation and helper functions for projects based on feathersjs.
Installation of the npm
npm install @lpgroup/yup
const yup = require("@lpgroup/yup");
const schema = { key: yup.string().required() };
/* xxx.yup.js */
const cy = require("@lpgroup/yup");
const requestSchema = {
_id: cy.uuid().required(),
alias: cy.string().required(),
name: cy.string().required(),
createdAt: cy.timestamp().defaultNull(),
changedAt: cy.timestamp().defaultNull(),
};
const dbSchema = {
added: cy.changed(),
changed: cy.changed(),
owner: cy.owner(),
};
module.exports = cy.buildValidationSchema(requestSchema, dbSchema);
module.exports.requestSchema = requestSchema;
/* xxx.service.js */
const { Xxx } = require("./xxx.class");
const hooks = require("./xxx.hooks");
const schema = require("./xxx.yup");
module.exports = (app) => {
const options = { id: "alias", schema };
app.use("/xxx", new Xxx(options, app));
const service = app.service("xxx");
service.hooks(hooks);
};
/* xxx.hooks.js */
const { validReq } = require("@lpgroup/yup");
const { validDB } = require("@lpgroup/yup");
module.exports = {
before: {
create: [validReq(), changeData(), validDB()],
update: [validReq(), changeData(), validDB()],
patch: [validReq(), changeData(), validDB()],
},
};
generalhooksvalidReq(objSchema)validReq(xxx);
validDB(objSchema)validDB(xxx);
yup.array(objSchema)const schema = { key: yup.array({ key: yup.string() }).required() };
When developing this NPM your can patch yup to give better error message.
npm run patch-package
See contribute
MIT - See licence
FAQs
Collection of yup validation functions.
The npm package @lpgroup/yup receives a total of 98 weekly downloads. As such, @lpgroup/yup popularity was classified as not popular.
We found that @lpgroup/yup demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.