You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
nau 64882fc513 get token for user, post users, get all users, post thought, get all thoughts. runs ok 8 years ago
..
HISTORY.md primer commit, server comença a funcionar 8 years ago
LICENSE primer commit, server comença a funcionar 8 years ago
README.md primer commit, server comença a funcionar 8 years ago
index.js primer commit, server comença a funcionar 8 years ago
package.json get token for user, post users, get all users, post thought, get all thoughts. runs ok 8 years ago

README.md

fresh

NPM Version NPM Downloads Node.js Version Build Status Test Coverage

HTTP response freshness testing

Installation

$ npm install fresh

API

var fresh = require('fresh')

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

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

License

MIT