fastify-require-feature
v1.0.2Feature requirement
This fastify plugin checks if a user meets the required browser features or redirects him to browser-update.org. You can also determine what should happen if the user doesn't meet the requirements.
Usage
const fastify = require("fastify")();
fastify.register(require("fastify-require-feature"), {
features: ["flexbox"], // features which need to be supported 100%
partially: ["fetch"], // feature which can be supported partially
action: "http://link.org", // or
action: (request, reply, done) => {
// Like a fastify hook
done();
}
});
// Your stuff
fastify.listen(8888, () => console.log("Ready"));
Used modules
npm i fastify-require-feature
Metadata
- MIT
- Whatever
- Nils Bergmann
- released 7/3/2018