UNPKG

motion

Version:

motion - moving development forward

77 lines (76 loc) 3.53 kB
{ "_args": [ [ "fresh@https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz", "/Users/nw/flint/packages/flint" ] ], "_from": "fresh@0.2.4", "_id": "fresh@0.2.4", "_inCache": true, "_location": "/fresh", "_phantomChildren": {}, "_requested": { "name": "fresh", "raw": "fresh@https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz", "rawSpec": "https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz", "scope": null, "spec": "https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz", "type": "remote" }, "_requiredBy": [ "/express", "/send", "/serve-static/send" ], "_resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz", "_shasum": "3582499206c9723714190edd74b4604feb4a614c", "_shrinkwrap": null, "_spec": "fresh@https://registry.npmjs.org/fresh/-/fresh-0.2.4.tgz", "_where": "/Users/nw/flint/packages/flint", "author": { "email": "tj@vision-media.ca", "name": "TJ Holowaychuk", "url": "http://tjholowaychuk.com" }, "bugs": { "url": "https://github.com/jshttp/fresh/issues" }, "dependencies": {}, "description": "HTTP response freshness testing", "devDependencies": { "istanbul": "0", "mocha": "1", "should": "3" }, "engines": { "node": ">= 0.6" }, "files": [ "HISTORY.md", "LICENSE", "index.js" ], "homepage": "https://github.com/jshttp/fresh#readme", "keywords": [ "cache", "conditional", "fresh", "http" ], "license": "MIT", "name": "fresh", "optionalDependencies": {}, "readme": "# fresh\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Node.js Version][node-version-image]][node-version-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n\nHTTP response freshness testing\n\n## Installation\n\n```\n$ npm install fresh\n```\n\n## API\n\n```js\nvar fresh = require('fresh')\n```\n\n### fresh(req, res)\n\n Check freshness of `req` and `res` headers.\n\n When the cache is \"fresh\" __true__ is returned,\n otherwise __false__ is returned to indicate that\n the cache is now stale.\n\n## Example\n\n```js\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'luna' };\nfresh(req, res);\n// => false\n\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'tobi' };\nfresh(req, res);\n// => true\n```\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/fresh.svg?style=flat\n[npm-url]: https://npmjs.org/package/fresh\n[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat\n[node-version-url]: http://nodejs.org/download/\n[travis-image]: https://img.shields.io/travis/jshttp/fresh.svg?style=flat\n[travis-url]: https://travis-ci.org/jshttp/fresh\n[coveralls-image]: https://img.shields.io/coveralls/jshttp/fresh.svg?style=flat\n[coveralls-url]: https://coveralls.io/r/jshttp/fresh?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/fresh.svg?style=flat\n[downloads-url]: https://npmjs.org/package/fresh\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git+https://github.com/jshttp/fresh.git" }, "scripts": { "test": "mocha --reporter spec --require should", "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should", "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should" }, "version": "0.2.4" }