arnaucube
arnaucube/comunicationLeapPublic Self-hosted repository
comunicationLeap/node_modules/fresh/Readme.md
node_modules/fresh/Readme.mdRaw
 1
 2# node-fresh
 3
 4  HTTP response freshness testing
 5
 6## fresh(req, res)
 7
 8 Check freshness of `req` and `res` headers.
 9
10 When the cache is "fresh" __true__ is returned,
11 otherwise __false__ is returned to indicate that
12 the cache is now stale.
13
14## Example:
15
16```js
17var req = { 'if-none-match': 'tobi' };
18var res = { 'etag': 'luna' };
19fresh(req, res);
20// => false
21
22var req = { 'if-none-match': 'tobi' };
23var res = { 'etag': 'tobi' };
24fresh(req, res);
25// => true
26```
27
28## Installation
29
30```
31$ npm install fresh
32```