koa-static-cache
Advanced tools
Comparing version 1.0.8 to 1.0.9
1.0.9 / 2014-03-31 | ||
================== | ||
* add url prefix option | ||
1.0.8 / 2014-03-31 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10170
134
119