Socket
Socket
Sign inDemoInstall

koa-send

Package Overview
Dependencies
Maintainers
9
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-send - npm Package Compare versions

Comparing version 3.1.0 to 3.1.1

6

History.md
3.1.1 / 2016-03-04
==================
* bump deps
* simplify scripts
3.1.0 / 2015-10-24

@@ -3,0 +9,0 @@ ==================

14

package.json

@@ -5,3 +5,3 @@ {

"repository": "koajs/send",
"version": "3.1.0",
"version": "3.1.1",
"keywords": [

@@ -17,6 +17,6 @@ "koa",

"devDependencies": {
"istanbul-harmony": "0",
"istanbul": "0",
"koa": "1",
"mocha": "2",
"should": "7",
"should": "8",
"supertest": "1"

@@ -28,10 +28,10 @@ },

"debug": "*",
"mz": "^2.1.0",
"resolve-path": "^1.3.0"
"mz": "^2.3.1",
"resolve-path": "^1.3.1"
},
"scripts": {
"test": "mocha --require should --reporter spec",
"test-cov": "node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --require should",
"test-travis": "node ./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --require should"
"test-cov": "istanbul cover ./node_modules/.bin/_mocha -- --require should",
"test-travis": "istanbul cover ./node_modules/.bin/_mocha --report lcovonly -- --require should"
}
}

@@ -51,2 +51,21 @@

## Example (Koa@2) with async/await
```js
var send = require('koa-send');
var Koa = require('koa');
var app = new Koa();
// $ GET /package.json
// $ GET /
app.use(async function (ctx, next){
if ('/' == ctx.path) return ctx.body = 'Try GET /package.json';
await send(ctx, ctx.path);
})
app.listen(3000);
console.log('listening on port 3000');
```
## Example

@@ -64,3 +83,3 @@

if ('/' == this.path) return this.body = 'Try GET /package.json';
yield send(this, __dirname + '/package.json');
yield send(this, this.path);
})

@@ -67,0 +86,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc