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

aspida

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aspida - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

1

dist/index.d.ts

@@ -37,3 +37,2 @@ export declare type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'HEAD' | 'PATCH' | 'OPTIONS';

export declare const headersToObject: (headers: Headers) => any;
export declare const dataToFormData: (data: Record<string, any>) => FormData;
export declare const dataToURLString: (data: Record<string, any>) => string;

@@ -40,0 +39,0 @@ export declare const optionToRequest: (option?: AspidaParams<any> | undefined, type?: "string" | "ArrayBuffer" | "any" | "FormData" | "URLSearchParams" | "Blob" | undefined) => AspidaRequest | undefined;

8

dist/index.js

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.optionToRequest = exports.dataToURLString = exports.dataToFormData = exports.headersToObject = void 0;
exports.optionToRequest = exports.dataToURLString = exports.headersToObject = void 0;
var headersToObject = function (headers) {

@@ -50,3 +50,3 @@ return __spread(headers.entries()).reduce(function (prev, _a) {

}
else {
else if (data[key] != null) {
formData.append(key, data[key]);

@@ -60,3 +60,2 @@ }

};
exports.dataToFormData = dataToFormData;
var encode = function (str) {

@@ -77,2 +76,3 @@ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function (match) {

return Object.keys(data)
.filter(function (key) { return data[key] != null; })
.map(function (key) {

@@ -93,3 +93,3 @@ return Array.isArray(data[key])

case 'FormData':
httpBody = exports.dataToFormData(option.body);
httpBody = dataToFormData(option.body);
break;

@@ -96,0 +96,0 @@ case 'URLSearchParams':

{
"name": "aspida",
"version": "1.2.1",
"version": "1.3.0",
"description": "TypeScript friendly HTTP client wrapper for the browser and node.js",

@@ -29,5 +29,5 @@ "author": "Solufa <solufa2020@gmail.com>",

"@types/minimist": "^1.2.1",
"chokidar": "^3.4.3",
"chokidar": "^3.5.1",
"minimist": "^1.2.5"
}
}

Sorry, the diff of this file is not supported yet

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