Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

koa-static-cache

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-static-cache - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

5

HISTORY.md
1.0.9 / 2014-03-31
==================
* add url prefix option
1.0.8 / 2014-03-31

@@ -3,0 +8,0 @@ ==================

4

index.js

@@ -31,5 +31,5 @@ var crypto = require('crypto')

options = options || {}
options.prefix = (options.prefix || '').replace(/\/$/, '') + '/'
files = files || options.files || Object.create(null)
dir = dir || options.dir || process.cwd()
var enableGzip = !!options.gzip

@@ -39,3 +39,3 @@

name = name.replace(/\\/g, '/')
var pathname = '/' + name
var pathname = options.prefix + name
var obj = files[pathname] = {}

@@ -42,0 +42,0 @@ var filename = obj.path = path.join(dir, name)

{
"name": "koa-static-cache",
"description": "Static cache for koa",
"version": "1.0.8",
"version": "1.0.9",
"author": {

@@ -6,0 +6,0 @@ "name": "Jonathan Ong",

@@ -38,2 +38,3 @@ # Koa Static Cache [![Build Status](https://travis-ci.org/koajs/static-cache.png)](https://travis-ci.org/koajs/static-cache)

- `options.alias` (obj) - object map of aliases. See below.
- `options.prefix` (str) - the url prefix you wish to add, default to `''`.
- `files` (obj) - optional files object. See below.

@@ -40,0 +41,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