
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
chained-schema
Advanced tools
Concise JSON Schema type builders.
npm install chained-schema
import { object, array, number, boolean, string } from 'chained-schema';
const phoneNumber = string.pattern(/\(?\d\d\d\)?-?\d\d\d-?\d\d\d\d/);
const user = object
.required('firstName', 'lastName')
.props({
firstName: string,
lastName: string,
email: string.nullable,
phoneNumber: phoneNumber.nullable,
password: string.default('secret').minLength(5),
});
Properties that require inputs are called as functions. Properties that don't require inputs are just chained as getters.
For example number.maximum takes an argument, but number.nullable doesn't, so it's a getter instead of a method.
number.minimum(0).nullable.maximum(10)
arrayitems(items)
additionalItems(additionalItems)
get uniqueItems
objectprops(p)
properties(properties)
dependencies(dependencies)
patternProperties(patternProperties)
additionalProperties(additionalProperties)
propertyNames(propertyNames)
minProperties(minProperties)
maxProperties(maxProperties)
stringminLength(minLength)
maxLength(maxLength)
format(format)
pattern(regex)
numberminimum(minimum)
maximum(maximum)
exclusiveMinimum(exclusiveMinimum)
exclusiveMaximum(exclusiveMaximum)
multipleOf(multipleOf)
integerSame as number.
booleanNo custom boolean options.
nill (null)No custom null options.
allOfanyOfoneOfnotFAQs
Concise JSON Schema type builders.
The npm package chained-schema receives a total of 2 weekly downloads. As such, chained-schema popularity was classified as not popular.
We found that chained-schema 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
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.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.