# koa-context

> Extend koa context

Latest version **1.0.0** (published 2015-09-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install koa-context
pnpm add koa-context
yarn add koa-context
bun add koa-context
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-09-15 |
| First published | 2015-09-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | cattail |

## Links

- npm: https://www.npmjs.com/package/koa-context
- Repository: https://github.com/cattail/koa-context
- Homepage: https://github.com/cattail/koa-context#readme
- Issues: https://github.com/cattail/koa-context/issues
- npm.io page: https://npm.io/package/koa-context

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) *
- [moder](https://npm.io/package/moder.md) ^0.1.1

## Recent versions

- 1.0.0 (latest) — 2015-09-15
- 0.0.0 — 2015-09-15

## README

# koa-context [![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][coveralls-image]][coveralls-url]

> Extend koa context

## Installation

    npm install --save koa-context

## Usage

With file `context/csrf.js`

    module.exports = {
        csrf: function() {
            // blanblanblan
        },
        assertCSRF: function() {
            // blanblanblan
        },
    };

We can't extend context by

    var app = require('koa')();
    var context = require('koa-context');
    context(app, __dirname + '/context');

    app.use(function* () {
        this.csrf();
    });

## License

MIT

[npm-image]: https://img.shields.io/npm/v/koa-context.svg?style=flat
[npm-url]: https://npmjs.org/package/koa-context
[travis-image]: https://img.shields.io/travis/CatTail/koa-context.svg?style=flat
[travis-url]: https://travis-ci.org/CatTail/koa-context
[coveralls-image]: https://img.shields.io/coveralls/CatTail/koa-context.svg?style=flat
[coveralls-url]: https://coveralls.io/r/CatTail/koa-context?branch=master

---
_Source: https://npm.io/package/koa-context · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
