New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

koa-incache

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-incache - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

coverage/coverage.raw.json

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # Change Log

## [0.3.0] - 2017-09-07
- Updated dependencies
- Minor improvement
## [0.2.0] - 2017-08-22

@@ -9,0 +13,0 @@ - Updated readme

14

index.js

@@ -30,11 +30,11 @@ const InCache = require('incache');

const config = defaulty(opts, defaultConfig);
defaulty(opts, defaultConfig);
if(config.life) {
config.maxAge = config.life * 1000;
/* istanbul ignore if */
if(opts.life) {
opts.maxAge = opts.life * 1000;
}
// One configuration
const incacheConfig = deleteKey(
Object.assign({}, config),
const incacheConfig = deleteKey.copy(opts,
['life','cachedProperty', 'onReadCache']

@@ -74,4 +74,4 @@ );

if (cached !== null) {
config.onReadCache.call(this, key, cached);
if (typeof cached !== 'undefined') {
opts.onReadCache.call(this, key, cached);
return ctx.body = cached;

@@ -78,0 +78,0 @@ }

{
"name": "koa-incache",
"version": "0.2.0",
"version": "0.3.0",
"description": "Koa cache middleware",

@@ -47,9 +47,9 @@ "main": "index.js",

"mocha-lcov-reporter": "^1.3.0",
"request": "^2.81.0"
"supertest": "^3.0.0"
},
"dependencies": {
"defaulty": "^1.1.0",
"delete-key": "^1.0.2",
"incache": "^4.0.2"
"defaulty": "^1.2.1",
"delete-key": "^1.1.0",
"incache": "^5.2.0"
}
}

Sorry, the diff of this file is not supported yet

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