Mali metadata middleware
npm install @malijs/metadataMali metadata middleware


| Param | Type | Description |
| --- | --- | --- |
| name | String | The name of the metadata object property |
| options | Options | |
| options.truthy | Boolean | optional check for truthiness on the param value within the request. Default: false |
| fn | function | The middleware function to execute |
Example
``js
const metadata = require('@malijs/metadata')
async function requestId (requestId, ctx, next) {
ctx.req.requestId = requestId
await next()
}
app.use(metadata('requestId', { truthy: true }, requestId))
``
Apache-2.0