
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
joi-extension-semver
Advanced tools
Semver extension for the Joi validation library
var joi = require('joi')
.extend(require('joi-extension-semver'));
joi.attempt('1.2.3', joi.semver().gte('1.2.3')); //1.2.3
joi.attempt('1.2.3', joi.semver().lt('1.2.3')); // throws ValidationError
joi.attempt('1.2.3', joi.semver().satisfies('^1.0.0')); // 1.2.3
See semver documentation. All boolean
returning comparisons are supported.
semver
Starts the chain. Does not perform any validation in itself. The reason for this is that it is possible to continue with semver.validRange()
in which
case the expected value should be a range instead of a version.
semver.valid()
Validates that the value is a semver version.
semver.gt(exp)
semver.gte(exp)
semver.lt(exp)
semver.lte(exp)
semver.eq(exp)
semver.neq(exp)
semver.cmp(cmp, exp)
semver.validRange()
Validates that the value is a semver range.
semver.satisfies(rng)
semver.gtr(rng)
semver.ltr(rng)
semver.outside(hilo, rng)
FAQs
Semver extension for the Joi validation library
The npm package joi-extension-semver receives a total of 7,654 weekly downloads. As such, joi-extension-semver popularity was classified as popular.
We found that joi-extension-semver demonstrated a not healthy version release cadence and project activity because the last version was released 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
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.