Socket
Socket
Sign inDemoInstall

cross-fetch

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-fetch - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

12

dist/browser.js

@@ -468,2 +468,12 @@ var self = {};

*/
module.exports = self;
var fetch = self.fetch;
fetch.fetch = fetch;
fetch.Response = self.Response;
fetch.Headers = self.Headers;
fetch.Request = self.Request;
// fetch now can be imported as the default object
module.exports = fetch;

3

dist/node-polyfill.js

@@ -1,5 +0,4 @@

"use strict";
var fetchNode = require('./node');
var fetch = fetchNode.fetch.bind({});
fetch.polyfill = true;

@@ -6,0 +5,0 @@

@@ -1,6 +0,4 @@

"use strict";
var realFetch = require('node-fetch');
var fetch = function(url, options) {
var fetch = function (url, options) {
// Support schemaless URIs on the server for parity with the browser.

@@ -14,9 +12,8 @@ // Ex: //github.com/ -> https://github.com/

fetch.fetch = fetch;
fetch.Response = realFetch.Response,
fetch.Headers = realFetch.Headers,
fetch.Request = realFetch.Request,
fetch.polyfill = false;
module.exports = {
fetch: fetch,
Response: realFetch.Response,
Headers: realFetch.Headers,
Request: realFetch.Request,
};
module.exports = fetch;
{
"name": "cross-fetch",
"version": "1.0.0",
"version": "1.1.0",
"description": "Universal WHATWG Fetch API for Node, Browsers and React Native",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/lquixada/cross-fetch",

@@ -42,6 +42,6 @@ cross-fetch

// Using ES6 modules
import { fetch } from 'cross-fetch';
import fetch from 'cross-fetch';
// Using CommonJS modules
const { fetch } = require('cross-fetch');
const fetch = require('cross-fetch');
```

@@ -76,3 +76,3 @@

```javascript
const { fetch } = require('cross-fetch');
const fetch = require('cross-fetch');

@@ -79,0 +79,0 @@ fetch('//api.github.com/users/lquixada')

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