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

fetch-addons

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-addons - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

dist/index.cjs

6

dist/headers.js
import { getRequest } from './request.js';
export function deleteEmptyHeaders(headers) {
// Can't do it in the headers.forEach loop, see https://twitter.com/meijer_s/status/1676506116736397312
[...headers.entries()].forEach(([key, value]) => {
for (const [key, value] of [...headers]) {
if (value && value !== 'undefined' && value !== 'null')
return;
continue;
headers.delete(key);
});
}
}

@@ -10,0 +10,0 @@ export function getHeaders(headersOrInput, init) {

{
"name": "fetch-addons",
"version": "1.0.2",
"version": "1.1.0",
"description": "A collection of addons for the fetch API",

@@ -15,10 +15,11 @@ "license": "MIT",

"types": "./dist/index.d.ts",
"main": "./dist/index.js",
"main": "./dist/index.cjs",
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./*.js": {
"default": "./dist/*.js",
"import": "./dist/*.js",
"types": "./dist/*.d.ts"

@@ -32,3 +33,4 @@ }

"test": "prettier -w . && eslint . --fix && jest",
"build": "rimraf ./dist && tsc -p tsconfig.build.json",
"build": "rimraf ./dist && tsc -p tsconfig.build.json && npm run build:cjs",
"build:cjs": "esbuild src/index.ts --bundle --outfile=dist/index.cjs --format=cjs --platform=node",
"prepare": "npm run build"

@@ -53,2 +55,3 @@ },

"@types/jest": "^29.5.2",
"esbuild": "^0.18.11",
"jest": "^29.5.0",

@@ -55,0 +58,0 @@ "rimraf": "^5.0.1",

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