Kane Internal User Data
This Koa middleware will retrieve the user data from headers and add it in the ctx.state
object.
Requirements
You need to execute node
version 8
at least (async/await
).
Installation
# npm npm install --save kane-internal-user-data# yarn yarn add kane-internal-user-data
Usage
This package will try to re-assemble the user data from headers (starting with x-user-*
) and add the resulting object to ctx.state
.
const Koa = ;const extractUserData = ; const app = ; app;
Linting
Made using eslint
. To enforce rules to be applied, use yarn lint:fix
.
Testing
Simply invoke yarn test
.
Contributing
First, install the dependencies using yarn
:
yarn install --frozen-lockfile
Verify that your project is configured correctly by launching tests:
yarn test
Before you start coding make sure that you've read our CONTRIBUTING
guide!