Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@types/serve-favicon
Advanced tools
TypeScript definitions for serve-favicon
npm install --save @types/serve-favicon
This package contains type definitions for serve-favicon (https://github.com/expressjs/serve-favicon).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-favicon.
/* =================== USAGE ===================
import serveFavicon = require('serve-favicon');
app.use(serveFavicon(__dirname + '/public/favicon.ico'));
=============================================== */
import express = require("express");
/**
* Node.js middleware for serving a favicon.
*/
declare function serveFavicon(
path: string | Buffer,
options?: serveFavicon.Options,
): express.RequestHandler;
declare namespace serveFavicon {
interface Options {
/**
* The cache-control max-age directive in ms, defaulting to 1 year.
* This can also be a string accepted by the `ms` module.
*/
maxAge?: number | string | undefined;
}
}
export = serveFavicon;
These definitions were written by Uros Smolnik, and Piotr Błażejewicz.
FAQs
TypeScript definitions for serve-favicon
The npm package @types/serve-favicon receives a total of 252,404 weekly downloads. As such, @types/serve-favicon popularity was classified as popular.
We found that @types/serve-favicon demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.