Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

docs

  • Loading branch information...
commit 1a8cc33d8746217c0c8517365ae52e2d78760a40 1 parent 82ec1f4
@tj tj authored
Showing with 28 additions and 0 deletions.
  1. +28 −0 Readme.md
View
28 Readme.md
@@ -0,0 +1,28 @@
+
+# fresh(req, res)
+
+ Check freshness of `req` and `res` headers.
+
+ When the cache is "fresh" __true__ is returned,
+ otherwise __false__ is returned to indicate that
+ the cache is now stale.
+
+## Example:
+
+```js
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'luna' };
+fresh(req, res);
+// => false
+
+var req = { 'if-none-match': 'tobi' };
+var res = { 'etag': 'tobi' };
+fresh(req, res);
+// => true
+```
+
+## Installation
+
+```
+$ npm install fresh
+```
Please sign in to comment.
Something went wrong with that request. Please try again.