🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@yqg/http

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yqg/http - npm Package Compare versions

Comparing version
0.0.4
to
0.0.5
+2
-2
dist/response-protocol.d.ts

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

import { YqgStatus, YqgResponse, YqgStatusCodeMap } from './constant';
import { YqgStatus, YqgResponse, YqgError, YqgStatusCodeMap } from './constant';
interface ResponseProtocolOption {

@@ -12,3 +12,3 @@ debug?: boolean;

success(body?: any): YqgResponse;
error(code: number | string | YqgStatus | Error, detail?: string): YqgResponse;
error(code: number | string | YqgStatus | YqgError | Error, detail?: string): YqgResponse;
throw(code: number | string | YqgStatus | Error, detail?: string): never;

@@ -15,0 +15,0 @@ }

@@ -48,3 +48,3 @@ "use strict";

ResponseProtocol.prototype.error = function (code, detail) {
var status = this.status(code);
var status = (code instanceof constant_1.YqgError) ? code.yqgStatus : this.status(code);
if (detail) {

@@ -51,0 +51,0 @@ status.detail = detail;

{
"name": "@yqg/http",
"version": "0.0.4",
"version": "0.0.5",
"author": "YQG <developer@yangqianguan.com>",

@@ -5,0 +5,0 @@ "repository": "https://github.com/yqg-fe/yqg-util/tree/master/packages/@yqg/http",