0.0.3 • Published 5 years ago

framework-identifier v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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