
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.

A lightweight validation library. Inspired by leonardoborges's bouncer for Clojure.
npm install bailer
Built-in validators are:
bailer.validations.required Validates when not null or undefinedbailer.validations.email Check email format via a regexpbailer.validations.number Validates when typeof returns "number"bailer.validations.string Validates when typeof returns "string"bailer.validations.object Validates when typeof returns "object". Arrays are objects.You can create your own (see here).
var b = require('bailer'),
v = b.validations;
// Define a dummy object.
var person = {name: "John", age: 20,
corporation: '',
email: "john.doe@example.org"};
// Check if it matches the schema.
b.validate(person, {
name: [v.required],
age: [v.required],
email: [v.email]
});
// Every validations passed.
// Result:
null
b.validate(person, {
name: [b.required],
corporation: [b.required],
firstname: [b.required]
});
// Uh-oh. The person object object doesn't have a truthy corporation
// (it is empty) or firstname (it is undefined).
// Result:
{corporation: ["corporation must be present"],
firstname: ["firstname must be present"]}
You can use a custom message.
b.validate(person, {
corporation: [b.required, "What! You don't work for a corporation?!"]
});
// which results in:
{corporation: ["What! You don't work for a corporation?!"]}
A custom validator is a function with this signature:
function customValidator(obj, attributeName) {
// Do your stuff here
// ...
var correctResult = obj[attributeName].length > 3;
// If the provided value is valid, return null.
// Otherwise, return a description.
return correctResult ? null : "".concat(attributename, " should contains at least 3 elements");
}
FAQs
Small validation library. Inspired by leonardoborges/bouncer.
The npm package bailer receives a total of 6 weekly downloads. As such, bailer popularity was classified as not popular.
We found that bailer 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.