Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vitrical/utils

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitrical/utils - npm Package Compare versions

Comparing version 1.1.8 to 1.1.9

4

api.d.ts

@@ -30,3 +30,3 @@ import { Response } from './superagent';

export declare const request: ({ method, url, body, query, headers, }: CustomRequestOptions) => Promise<CustomRequestResponse>;
export declare const makeMicroserviceRequest: (baseURL: string, key: string) => (method: 'get' | 'post' | 'put' | 'delete', url: string, options?: {
export declare function makeMicroserviceRequest<T = any>(baseURL: string, key: string): (method: 'get' | 'post' | 'put' | 'delete', url: string, options?: {
body?: string | {

@@ -41,2 +41,2 @@ [key: string]: any;

} | undefined;
} | undefined) => Promise<CustomRequestResponse>;
} | undefined) => () => Promise<T>;

@@ -89,13 +89,18 @@ "use strict";

exports.request = request;
const makeMicroserviceRequest = (baseURL, key) => (method, url, options) => (0, exports.request)({
method,
url: `${baseURL}${url}`,
body: options?.body,
query: options?.query,
headers: {
key,
...options?.headers,
},
});
function makeMicroserviceRequest(baseURL, key) {
return (method, url, options) => async () => {
const req = await (0, exports.request)({
method,
url: `${baseURL}${url}`,
body: options?.body,
query: options?.query,
headers: {
key,
...options?.headers,
},
});
return req.body;
};
}
exports.makeMicroserviceRequest = makeMicroserviceRequest;
//# sourceMappingURL=api.js.map
{
"name": "@vitrical/utils",
"version": "1.1.8",
"version": "1.1.9",
"description": "Collection of useful functions and typings",

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc