Socket
Socket
Sign inDemoInstall

fastify-static

Package Overview
Dependencies
Maintainers
5
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-static - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

1

index.js

@@ -50,2 +50,3 @@ 'use strict'

if (!opts.prefix) opts.prefix = '/'
const prefix = opts.prefix[opts.prefix.length - 1] === '/' ? opts.prefix : (opts.prefix + '/')

@@ -52,0 +53,0 @@ fastify.get(prefix + '*', function (req, reply) {

4

package.json
{
"name": "fastify-static",
"version": "0.2.0",
"version": "0.2.1",
"description": "Plugin for serving static file as fast as possible Edit",

@@ -33,3 +33,3 @@ "main": "index.js",

"fastify": "^0.29.0",
"coveralls": "^2.13.1",
"coveralls": "^3.0.0",
"pre-commit": "^1.2.2",

@@ -36,0 +36,0 @@ "request": "^2.81.0",

@@ -301,1 +301,8 @@ 'use strict'

})
t.test('prefix default', t => {
t.plan(1)
const pluginOptions = {root: path.join(__dirname, 'static')}
const fastify = require('fastify')({logger: false})
t.doesNotThrow(() => fastify.register(fastifyStatic, pluginOptions))
})
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc