@types/express-list-endpoints
Advanced tools
| { | ||
| "name": "@types/express-list-endpoints", | ||
| "version": "6.0.3", | ||
| "description": "TypeScript definitions for express-list-endpoints", | ||
| "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-list-endpoints", | ||
| "license": "MIT", | ||
| "contributors": [ | ||
| { | ||
| "name": "S Joseph", | ||
| "githubUsername": "sjoseph7", | ||
| "url": "https://github.com/sjoseph7" | ||
| } | ||
| ], | ||
| "version": "7.1.0", | ||
| "description": "Stub TypeScript definitions entry for express-list-endpoints, which provides its own types definitions", | ||
| "main": "", | ||
| "types": "index.d.ts", | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", | ||
| "directory": "types/express-list-endpoints" | ||
| }, | ||
| "scripts": {}, | ||
| "license": "MIT", | ||
| "dependencies": { | ||
| "@types/express": "*" | ||
| "express-list-endpoints": "*" | ||
| }, | ||
| "typesPublisherContentHash": "fa6f8714b992a25fba2090f474617fe9d1a6ea2fbf3a869311c251a06191cbe5", | ||
| "typeScriptVersion": "4.5" | ||
| "deprecated": "This is a stub types definition. express-list-endpoints provides its own type definitions, so you do not need this installed." | ||
| } |
@@ -1,70 +0,3 @@ | ||
| # Installation | ||
| > `npm install --save @types/express-list-endpoints` | ||
| This is a stub types definition for @types/express-list-endpoints (https://github.com/AlbertoFdzM/express-list-endpoints#readme). | ||
| # Summary | ||
| This package contains type definitions for express-list-endpoints (https://github.com/AlbertoFdzM/express-list-endpoints). | ||
| # Details | ||
| Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-list-endpoints. | ||
| ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/express-list-endpoints/index.d.ts) | ||
| ````ts | ||
| /* =================== USAGE =================== | ||
| import * as express from "express"; | ||
| import listEndpoints from "express-list-endpoints"; | ||
| const app = express(); | ||
| app.route('/') | ||
| .all(function namedMiddleware(req, res) { | ||
| // Handle request | ||
| }) | ||
| .get(function(req, res) { | ||
| // Handle request | ||
| }) | ||
| .post(function(req, res) { | ||
| // Handle request | ||
| }); | ||
| app.route('/about') | ||
| .get(function(req, res) { | ||
| // Handle request | ||
| }); | ||
| console.log(listEndpoints(app)); | ||
| // It omits the 'all' verbs. | ||
| [{ | ||
| path: '/', | ||
| methods: ['GET', 'POST'], | ||
| middlewares: ['namedMiddleware', 'anonymous', 'anonymous'] | ||
| }, | ||
| { | ||
| path: '/about', | ||
| methods: ['GET'], | ||
| middlewares: ['anonymous'] | ||
| }] | ||
| =============================================== */ | ||
| import express = require("express"); | ||
| declare function listEndpoints(app: express.Express): listEndpoints.Endpoint[]; | ||
| declare namespace listEndpoints { | ||
| interface Endpoint { | ||
| path: string; | ||
| methods: string[]; | ||
| middlewares: string[]; | ||
| } | ||
| } | ||
| export = listEndpoints; | ||
| ```` | ||
| ### Additional Details | ||
| * Last updated: Tue, 07 Nov 2023 03:09:36 GMT | ||
| * Dependencies: [@types/express](https://npmjs.com/package/@types/express) | ||
| # Credits | ||
| These definitions were written by [S Joseph](https://github.com/sjoseph7). | ||
| express-list-endpoints provides its own type definitions, so you don't need @types/express-list-endpoints installed! |
| /* =================== USAGE =================== | ||
| import * as express from "express"; | ||
| import listEndpoints from "express-list-endpoints"; | ||
| const app = express(); | ||
| app.route('/') | ||
| .all(function namedMiddleware(req, res) { | ||
| // Handle request | ||
| }) | ||
| .get(function(req, res) { | ||
| // Handle request | ||
| }) | ||
| .post(function(req, res) { | ||
| // Handle request | ||
| }); | ||
| app.route('/about') | ||
| .get(function(req, res) { | ||
| // Handle request | ||
| }); | ||
| console.log(listEndpoints(app)); | ||
| // It omits the 'all' verbs. | ||
| [{ | ||
| path: '/', | ||
| methods: ['GET', 'POST'], | ||
| middlewares: ['namedMiddleware', 'anonymous', 'anonymous'] | ||
| }, | ||
| { | ||
| path: '/about', | ||
| methods: ['GET'], | ||
| middlewares: ['anonymous'] | ||
| }] | ||
| =============================================== */ | ||
| import express = require("express"); | ||
| declare function listEndpoints(app: express.Express): listEndpoints.Endpoint[]; | ||
| declare namespace listEndpoints { | ||
| interface Endpoint { | ||
| path: string; | ||
| methods: string[]; | ||
| middlewares: string[]; | ||
| } | ||
| } | ||
| export = listEndpoints; |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1855
-61.5%3
-25%0
-100%2
100%1
Infinity%1
Infinity%3
-95.77%1
Infinity%1
Infinity%+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed