109 lines
7.1 KiB
JSON
109 lines
7.1 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "serve-favicon@~2.3.0",
|
|
"scope": null,
|
|
"escapedName": "serve-favicon",
|
|
"name": "serve-favicon",
|
|
"rawSpec": "~2.3.0",
|
|
"spec": ">=2.3.0 <2.4.0",
|
|
"type": "range"
|
|
},
|
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/connect"
|
|
]
|
|
],
|
|
"_from": "serve-favicon@>=2.3.0 <2.4.0",
|
|
"_id": "serve-favicon@2.3.2",
|
|
"_inCache": true,
|
|
"_location": "/serve-favicon",
|
|
"_npmOperationalInternal": {
|
|
"host": "packages-12-west.internal.npmjs.com",
|
|
"tmp": "tmp/serve-favicon-2.3.2.tgz_1479350882429_0.391693202778697"
|
|
},
|
|
"_npmUser": {
|
|
"name": "dougwilson",
|
|
"email": "doug@somethingdoug.com"
|
|
},
|
|
"_npmVersion": "1.4.28",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "serve-favicon@~2.3.0",
|
|
"scope": null,
|
|
"escapedName": "serve-favicon",
|
|
"name": "serve-favicon",
|
|
"rawSpec": "~2.3.0",
|
|
"spec": ">=2.3.0 <2.4.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/connect"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.3.2.tgz",
|
|
"_shasum": "dd419e268de012ab72b319d337f2105013f9381f",
|
|
"_shrinkwrap": null,
|
|
"_spec": "serve-favicon@~2.3.0",
|
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/connect",
|
|
"author": {
|
|
"name": "Douglas Christopher Wilson",
|
|
"email": "doug@somethingdoug.com"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/expressjs/serve-favicon/issues"
|
|
},
|
|
"dependencies": {
|
|
"etag": "~1.7.0",
|
|
"fresh": "0.3.0",
|
|
"ms": "0.7.2",
|
|
"parseurl": "~1.3.1"
|
|
},
|
|
"description": "favicon serving middleware with caching",
|
|
"devDependencies": {
|
|
"istanbul": "0.4.5",
|
|
"mocha": "2.5.3",
|
|
"proxyquire": "1.4.0",
|
|
"supertest": "1.1.0"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"shasum": "dd419e268de012ab72b319d337f2105013f9381f",
|
|
"tarball": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.3.2.tgz"
|
|
},
|
|
"engines": {
|
|
"node": ">= 0.8.0"
|
|
},
|
|
"files": [
|
|
"LICENSE",
|
|
"HISTORY.md",
|
|
"index.js"
|
|
],
|
|
"gitHead": "4dafcef8a2ddd26731ed12bfc8c958312889eb7e",
|
|
"homepage": "https://github.com/expressjs/serve-favicon#readme",
|
|
"keywords": [
|
|
"express",
|
|
"favicon",
|
|
"middleware"
|
|
],
|
|
"license": "MIT",
|
|
"maintainers": [
|
|
{
|
|
"name": "dougwilson",
|
|
"email": "doug@somethingdoug.com"
|
|
}
|
|
],
|
|
"name": "serve-favicon",
|
|
"optionalDependencies": {},
|
|
"readme": "# serve-favicon\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Linux Build][travis-image]][travis-url]\n[![Windows Build][appveyor-image]][appveyor-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n[![Gittip][gittip-image]][gittip-url]\n\nNode.js middleware for serving a favicon.\n\nA favicon is a visual cue that client software, like browsers, use to identify\na site. For an example and more information, please visit\n[the Wikipedia article on favicons](https://en.wikipedia.org/wiki/Favicon).\n\nWhy use this module?\n\n - User agents request `favicon.ico` frequently and indiscriminately, so you\n may wish to exclude these requests from your logs by using this middleware\n before your logger middleware.\n - This module caches the icon in memory to improve performance by skipping\n disk access.\n - This module provides an `ETag` based on the contents of the icon, rather\n than file system properties.\n - This module will serve with the most compatible `Content-Type`.\n\n**Note** This module is exclusively for serving the \"default, implicit favicon\",\nwhich is `GET /favicon.ico`. For additional vendor-specific icons that require\nHTML markup, additional middleware is required to serve the relevant files, for\nexample [serve-static](https://npmjs.org/package/serve-static).\n\n## Install\n\nThis is a [Node.js](https://nodejs.org/en/) module available through the\n[npm registry](https://www.npmjs.com/). Installation is done using the\n[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\n\n```bash\nnpm install serve-favicon\n```\n\n## API\n\n### favicon(path, options)\n\nCreate new middleware to serve a favicon from the given `path` to a favicon file.\n`path` may also be a `Buffer` of the icon to serve.\n\n#### Options\n\nServe favicon accepts these properties in the options object.\n\n##### maxAge\n\nThe `cache-control` `max-age` directive in `ms`, defaulting to 1 year. This can\nalso be a string accepted by the [ms](https://www.npmjs.org/package/ms#readme)\nmodule.\n\n## Examples\n\nTypically this middleware will come very early in your stack (maybe even first)\nto avoid processing any other middleware if we already know the request is for\n`/favicon.ico`.\n\n### express\n\n```javascript\nvar express = require('express');\nvar favicon = require('serve-favicon');\n\nvar app = express();\napp.use(favicon(__dirname + '/public/favicon.ico'));\n\n// Add your routes here, etc.\n\napp.listen(3000);\n```\n\n### connect\n\n```javascript\nvar connect = require('connect');\nvar favicon = require('serve-favicon');\n\nvar app = connect();\napp.use(favicon(__dirname + '/public/favicon.ico'));\n\n// Add your middleware here, etc.\n\napp.listen(3000);\n```\n\n### vanilla http server\n\nThis middleware can be used anywhere, even outside express/connect. It takes\n`req`, `res`, and `callback`.\n\n```javascript\nvar http = require('http');\nvar favicon = require('serve-favicon');\nvar finalhandler = require('finalhandler');\n\nvar _favicon = favicon(__dirname + '/public/favicon.ico');\n\nvar server = http.createServer(function onRequest(req, res) {\n var done = finalhandler(req, res);\n\n _favicon(req, res, function onNext(err) {\n if (err) return done(err);\n\n // continue to process the request here, etc.\n\n res.statusCode = 404;\n res.end('oops');\n });\n});\n\nserver.listen(3000);\n```\n\n## License\n\n[MIT](LICENSE)\n\n[npm-image]: https://img.shields.io/npm/v/serve-favicon.svg\n[npm-url]: https://npmjs.org/package/serve-favicon\n[travis-image]: https://img.shields.io/travis/expressjs/serve-favicon/master.svg?label=linux\n[travis-url]: https://travis-ci.org/expressjs/serve-favicon\n[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/serve-favicon/master.svg?label=windows\n[appveyor-url]: https://ci.appveyor.com/project/dougwilson/serve-favicon\n[coveralls-image]: https://img.shields.io/coveralls/expressjs/serve-favicon.svg\n[coveralls-url]: https://coveralls.io/r/expressjs/serve-favicon?branch=master\n[downloads-image]: https://img.shields.io/npm/dm/serve-favicon.svg\n[downloads-url]: https://npmjs.org/package/serve-favicon\n[gittip-image]: https://img.shields.io/gittip/dougwilson.svg\n[gittip-url]: https://www.gittip.com/dougwilson/\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/expressjs/serve-favicon.git"
|
|
},
|
|
"scripts": {
|
|
"test": "mocha --reporter spec --bail --check-leaks test/",
|
|
"test-ci": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
|
|
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/"
|
|
},
|
|
"version": "2.3.2"
|
|
}
|