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

xfetch-js

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xfetch-js - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"name": "xfetch-js",
"version": "0.0.3",
"version": "0.0.4",
"description": "",

@@ -5,0 +5,0 @@ "main": "xfetch.js",

@@ -8,5 +8,3 @@ # XFetch.js

[![Build Status](https://img.shields.io/travis/maple3142/xfetch-js.svg?style=flat-square)](https://travis-ci.org/maple3142/xfetch-js)
![npm](https://img.shields.io/npm/v/xfetch-js.svg?style=flat-square)
![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/xfetch-js.svg?style=flat-square)
![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/xfetch-js.svg?style=flat-square)
[![npm](https://img.shields.io/npm/v/xfetch-js.svg?style=flat-square)](https://www.npmjs.com/package/xfetch-js)

@@ -16,4 +14,2 @@ ## Examaple

```js
// in browser, window.xfetch is the default exports
// get with query string

@@ -20,0 +16,0 @@ xf('https://postman-echo.com/get/', { qs: { foo: 'bar' } })

@@ -11,3 +11,3 @@ /*

} else {
root.xfetch = fn()
root.xf = fn()
}

@@ -14,0 +14,0 @@ })(this, () => {

@@ -1,1 +0,1 @@

((a,b)=>{"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.xfetch=b()})(this,()=>{const a=["get","post","put","patch","delete","head"],b=["arrayBuffer","blob","formData","json","text"],c=c=>{const d=(a,d={})=>{if(d.headers||(d.headers={}),d.json?(d.body=JSON.stringify(d.json),d.headers["Content-Type"]="application/json"):d.form&&(d.body=new URLSearchParams(d.form).toString(),d.headers["Content-Type"]="application/x-www-form-urlencoded"),d.qs){const b=new URL(a);b.search=new URLSearchParams(d.qs).toString(),a=b.href}d.credentials||(d.credentials="same-origin");const e=c(a,d).then(a=>{if(a.ok)return a;throw new Error(a.status)});for(const c of b)e[c]=()=>e.then(a=>a[c]());return e};for(const b of a)d[b]=(a,c={})=>(c.method=b,d(a,c));return d},d=c("undefined"==typeof fetch?null:fetch);return d.create=c,d});
((a,b)=>{"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.xf=b()})(this,()=>{const a=["get","post","put","patch","delete","head"],b=["arrayBuffer","blob","formData","json","text"],c=c=>{const d=(a,d={})=>{if(d.headers||(d.headers={}),d.json?(d.body=JSON.stringify(d.json),d.headers["Content-Type"]="application/json"):d.form&&(d.body=new URLSearchParams(d.form).toString(),d.headers["Content-Type"]="application/x-www-form-urlencoded"),d.qs){const b=new URL(a);b.search=new URLSearchParams(d.qs).toString(),a=b.href}d.credentials||(d.credentials="same-origin");const e=c(a,d).then(a=>{if(a.ok)return a;throw new Error(a.status)});for(const c of b)e[c]=()=>e.then(a=>a[c]());return e};for(const b of a)d[b]=(a,c={})=>(c.method=b,d(a,c));return d},d=c("undefined"==typeof fetch?null:fetch);return d.create=c,d});
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