Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@marblejs/middleware-joi
Advanced tools
A joi validation middleware for Marble.js.
@marblejs/middleware-joi
is deprecated since v2.0.
Please use @marblejs/middlware-io
instead.
$ npm i @marblejs/middleware-joi
Requires @marblejs/core
to be installed.
For the latest updates, documentation, change log, and release information visit docs.marblejs.com and follow @marble_js on Twitter.
Example of using this middleware on a GET route to validate params.
import { validator$, Joi } from '@marblejs/middleware-joi';
const foo$ = r.pipe(
r.matchPath('/foo/:id'),
r.matchType('GET'),
r.useEffect(req$ => req$.pipe(
use(validator$({
params: Joi.object({
id: Joi.number().min(1).max(10),
})
}));
// ...
)));
Example to validate all incoming requests.
import { validator$, Joi } from '@marblejs/middleware-joi';
const middlewares = [
logger$,
validator$({
headers: Joi.object({
sign: Joi.string(),
accept: Joi.string().default('application/json'),
}),
params: Joi.object({
apiKey: Joi.string().token().required(),
})
})
];
const effects = [
endpoint1$,
endpoint2$,
...
];
const app = httpListener({ middlewares, effects });
License: MIT
FAQs
A joi validation middleware for Marble.js
The npm package @marblejs/middleware-joi receives a total of 23 weekly downloads. As such, @marblejs/middleware-joi popularity was classified as not popular.
We found that @marblejs/middleware-joi 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.