@doctadevs/utils
Advanced tools
Comparing version 0.0.1 to 0.0.2
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.request = void 0; | ||
const request = async ({ url, method = 'GET', data, queryParams = {}, token = '', contentType = 'json', }) => fetch(`${url}${Object.entries(queryParams) | ||
const node_fetch_1 = __importDefault(require("node-fetch")); | ||
const request = async ({ url, method = 'GET', data, queryParams = {}, token = '', contentType = 'json', }) => node_fetch_1.default(`${url}${Object.entries(queryParams) | ||
.map(([key, value]) => `${encodeURIComponent(key)}=${encodeURIComponent(value)}`) | ||
@@ -6,0 +10,0 @@ .join('&')}`, { |
{ | ||
"name": "@doctadevs/utils", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
@@ -0,1 +1,3 @@ | ||
import fetch from 'node-fetch'; | ||
export type RequestOptions = { | ||
@@ -2,0 +4,0 @@ url: string; |
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
6895
117
0