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 0.0.10 to 0.0.11

16

dist/index.js

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

var SOURCE = 'library';
var VERSION = '0.0.10';
var VERSION = '0.0.11';

@@ -36,11 +36,11 @@ function WonderfulFetch(url, options) {

options.contentType = (typeof options.contentType === 'undefined' ? '' : options.contentType).toLowerCase();
options.responseFormat = (typeof options.responseFormat === 'undefined' ? 'raw' : options.responseFormat).toLowerCase();
options.response = (typeof options.response === 'undefined' ? 'raw' : options.response).toLowerCase();
// Legacy
if (options.raw) {
options.responseFormat = 'raw'
options.response = 'raw'
} else if (options.json) {
options.responseFormat = 'json'
options.response = 'json'
} else if (options.text) {
options.responseFormat = 'text'
options.response = 'text'
}

@@ -143,3 +143,3 @@

if (options.ok && options.download) {
if (res.ok && options.download) {
jetpack = jetpack || require('fs-jetpack');

@@ -165,3 +165,3 @@ if (!jetpack.exists(options.download)) {

if (res.ok) {
if (options.responseFormat === 'raw') {
if (options.response === 'raw') {
return _resolve(res);

@@ -171,3 +171,3 @@ } else {

.then(function (text) {
if (options.responseFormat === 'json') {
if (options.response === 'json') {
JSON5 = JSON5 || require('json5');

@@ -174,0 +174,0 @@ try {

{
"name": "wonderful-fetch",
"version": "0.0.10",
"version": "0.0.11",
"description": "A wrapper around fetch.",

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

@@ -83,3 +83,3 @@ <p align="center">

* Default: `get`
* responseFormat `string`: Format of the response
* response `string`: Automatically format the response
* Acceptable Values: `raw`, `json`, `text`

@@ -86,0 +86,0 @@ * Default: `raw`

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