Created
December 23, 2019 13:53
-
-
Save zavr-1/bdbfd430bc6fd049fd0b60d4ee483c06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Context prototype. | |
*/ | |
const proto = module.exports = { | |
/** | |
* Return JSON representation. | |
* | |
*/ | |
toJSON() { | |
return { | |
request: this.request.toJSON(), | |
// ... | |
}; | |
}, | |
/** | |
* Similar to .throw(), adds assertion. | |
*/ | |
assert: httpAssert, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment