framework-identifier

0.0.3 • Public • Published

Framework Identifier

A package to detect which node web framework belongs that server, app or api instance.

Install

NPM

  • Use: require('framework-identifier')
  • Install: npm install --save framework-identifier

YARN

  • Use: require('framework-identifier')
  • Install: yarn add framework-identifier

Usage

Example

const frameworkIdentifier = require('framework-identifier')
const fastify = require('fastify')
const express = require('express')
const Hapi = require('@hapi/hapi')
const Koa = require('koa')
 
 
 
const fastifyApp = fastify()
const expressApp = express()
const koaApp = new Koa()
const hapiApp = Hapi.server()
 
console.log(frameworkIdentifier(fastifyApp)) // fastify
console.log(frameworkIdentifier(expressApp)) // express
console.log(frameworkIdentifier(koaApp)) // koa
console.log(frameworkIdentifier(hapiApp)) // hapi

License

Licensed under permissive MIT license

Package Sidebar

Install

npm i framework-identifier

Weekly Downloads

4

Version

0.0.3

License

MIT

Unpacked Size

7.81 kB

Total Files

5

Last publish

Collaborators

  • nneutrinno