From e1a219e43422e923377613970571499196c4431b Mon Sep 17 00:00:00 2001 From: Stig Otnes Kolstad Date: Fri, 25 Mar 2016 00:57:25 +0100 Subject: [PATCH] Update context.md Corrected wrong param order in method description for ctx.assert --- docs/api/context.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/context.md b/docs/api/context.md index 149e95f..e267ffb 100644 --- a/docs/api/context.md +++ b/docs/api/context.md @@ -119,7 +119,7 @@ this.throw('access_denied', { user: user }); koa uses [http-errors](https://github.com/jshttp/http-errors) to create errors. -### ctx.assert(value, [msg], [status], [properties]) +### ctx.assert(value, [status], [msg], [properties]) Helper method to throw an error similar to `.throw()` when `!value`. Similar to node's [assert()](http://nodejs.org/api/assert.html)