Socket
Socket
Sign inDemoInstall

express-router-api

Package Overview
Dependencies
65
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.1 to 1.3.2

8

dist/index.d.ts

@@ -18,6 +18,6 @@ import { Request, Response, Router, RouterOptions } from 'express';

}
declare type ApiResult = SimpleApiResult | ApiResponse;
declare type AsyncApiResult = Observable<ApiResult> | Promise<ApiResult>;
declare type ErrorFormatter = (err: Error, req: Request, res: Response) => AsyncApiResult | ApiResult;
declare type SuccessFormatter = (data: ApiResult, req: Request, res: Response) => AsyncApiResult | ApiResult;
export declare type ApiResult = SimpleApiResult | ApiResponse;
export declare type AsyncApiResult = Observable<ApiResult> | Promise<ApiResult>;
export declare type ErrorFormatter = (err: Error, req: Request, res: Response) => AsyncApiResult | ApiResult;
export declare type SuccessFormatter = (data: ApiResult, req: Request, res: Response) => AsyncApiResult | ApiResult;
export interface ApiRouterOptions extends RouterOptions {

@@ -24,0 +24,0 @@ errorFormatter?: ErrorFormatter;

{
"name": "express-router-api",
"version": "1.3.1",
"version": "1.3.2",
"description": "Express router that lets you construct your API entirely on promises",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,2 +0,5 @@

import { NextFunction, Request, RequestHandler, RequestParamHandler, Response, Router, RouterOptions, IRoute } from 'express';
import {
IRoute, NextFunction, Request, RequestHandler,
RequestParamHandler, Response, Router, RouterOptions,
} from 'express';
import { PathParams, RequestHandlerParams } from 'express-serve-static-core';

@@ -37,7 +40,7 @@ import { defer, forkJoin, from, identity, isObservable, Observable, of, throwError } from 'rxjs';

type ApiResult = SimpleApiResult | ApiResponse;
type AsyncApiResult = Observable<ApiResult> | Promise<ApiResult>;
export type ApiResult = SimpleApiResult | ApiResponse;
export type AsyncApiResult = Observable<ApiResult> | Promise<ApiResult>;
type ErrorFormatter = (err: Error, req: Request, res: Response) => AsyncApiResult | ApiResult;
type SuccessFormatter = (data: ApiResult, req: Request, res: Response) => AsyncApiResult | ApiResult;
export type ErrorFormatter = (err: Error, req: Request, res: Response) => AsyncApiResult | ApiResult;
export type SuccessFormatter = (data: ApiResult, req: Request, res: Response) => AsyncApiResult | ApiResult;

@@ -44,0 +47,0 @@ export interface ApiRouterOptions extends RouterOptions {

@@ -46,3 +46,3 @@ {

// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */

@@ -49,0 +49,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc