New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wonderful-fetch

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wonderful-fetch - npm Package Compare versions

Comparing version 1.1.8 to 1.1.9

16

dist/index.js

@@ -25,3 +25,3 @@ (function (root, factory) {

var SOURCE = 'library';
var VERSION = '1.1.8';
var VERSION = '1.1.9';

@@ -60,2 +60,3 @@ function WonderfulFetch(url, options) {

// Check if URL is provided
if (!url) {

@@ -65,7 +66,10 @@ return reject(new Error('No URL provided.'))

// Build configuration
var config = {
method: (options.method || 'get').toLowerCase(),
headers: options.headers || {},
body: null,
}
// Format body
if (options.body) {

@@ -81,5 +85,3 @@ if (bodyIsFormData) {

// if (options.json && options.body && config.method === 'post') {
// config.headers['Content-Type'] = 'application/json';
// }
// Set content type
if (

@@ -92,6 +94,9 @@ (bodyIsObject && !bodyIsFormData)

// GET requests should not have a body or content type
if (config.method === 'get') {
delete config.body;
delete config.headers['Content-Type'];
}
// Log
if (options.log) {

@@ -101,4 +106,6 @@ console.log('Fetch configuration:', 'bodyIsFormData=' + bodyIsFormData, 'bodyIsObject=' + bodyIsObject, options, config);

// Set timeout
var timeoutHolder;
// Fetch
function _fetch() {

@@ -293,3 +300,2 @@ var ms = Math.min((3000 * (tries - 1)), 60000);

// Reference

@@ -296,0 +302,0 @@ if (environment === 'browser') {

{
"name": "wonderful-fetch",
"version": "1.1.8",
"version": "1.1.9",
"description": "A wrapper around fetch.",

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

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