@fastify/etag
Advanced tools
Comparing version 4.1.0 to 4.2.0
@@ -32,3 +32,3 @@ 'use strict' | ||
module.exports = fp(async function etag (app, opts) { | ||
async function fastifyEtag (app, opts) { | ||
const hash = buildHashFn(opts.algorithm, opts.weak) | ||
@@ -58,5 +58,9 @@ | ||
}) | ||
}, { | ||
} | ||
module.exports = fp(fastifyEtag, { | ||
fastify: '4.x', | ||
name: '@fastify/etag' | ||
}) | ||
module.exports.default = fastifyEtag | ||
module.exports.fastifyEtag = fastifyEtag |
{ | ||
"name": "@fastify/etag", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "Automatically generate etags for HTTP responses, for Fastify", | ||
@@ -38,3 +38,3 @@ "main": "index.js", | ||
"tap": "^16.0.0", | ||
"tsd": "^0.22.0" | ||
"tsd": "^0.24.1" | ||
}, | ||
@@ -41,0 +41,0 @@ "dependencies": { |
import { FastifyPluginAsync } from 'fastify' | ||
export interface FastifyEtagOptions { | ||
algorithm?: 'fnv1a' | string; | ||
weak?: boolean; | ||
type FastifyEtag = FastifyPluginAsync<fastifyEtag.FastifyEtagOptions> | ||
declare namespace fastifyEtag { | ||
export interface FastifyEtagOptions { | ||
algorithm?: 'fnv1a' | string; | ||
weak?: boolean; | ||
} | ||
export const fastifyEtag: FastifyEtag | ||
export { fastifyEtag as default } | ||
} | ||
declare const fastifyEtag: FastifyPluginAsync<FastifyEtagOptions> | ||
export default fastifyEtag; | ||
declare function fastifyEtag(...params: Parameters<FastifyEtag>): ReturnType<FastifyEtag> | ||
export = fastifyEtag |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
30862
557
1