cross-fetch
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -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; | ||
@@ -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') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
64203
855
15