cross-fetch-ponyfill
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,1 +0,11 @@ | ||
export default self.fetch | ||
export const Blob = self.Blob | ||
export const File = self.File | ||
export const FormData = self.FormData | ||
export const Headers = self.Headers | ||
export const Request = self.Request | ||
export const Response = self.Response | ||
export const AbortController = self.AbortController | ||
export const AbortSignal = self.AbortSignal | ||
export const fetch = self.fetch || (() => { throw new Error('global fetch is not available!') }) | ||
export default fetch |
31
node.js
@@ -1,3 +0,30 @@ | ||
import polyfill from 'node-fetch' | ||
import _fetch, { | ||
Blob as _Blob, | ||
File as _File, | ||
FormData as _FormData, | ||
Headers as _Headers, | ||
Request as _Request, | ||
Response as _Response | ||
} from 'node-fetch' | ||
export default global.fetch || polyfill | ||
export const fetch = global.fetch || _fetch | ||
export default fetch | ||
export const Blob = global.Blob || _Blob | ||
export const File = global.File || _File | ||
export const FormData = global.FormData || _FormData | ||
export const Headers = global.Headers || _Headers | ||
export const Request = global.Request || _Request | ||
export const Response = global.Response || _Response | ||
export const AbortController = global.AbortController | ||
export const AbortSignal = global.AbortSignal | ||
export { | ||
AbortError, | ||
FetchError, | ||
blobFrom, | ||
blobFromSync, | ||
fileFrom, | ||
fileFromSync, | ||
isRedirect | ||
} from 'node-fetch' |
{ | ||
"name": "cross-fetch-ponyfill", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"type": "module", | ||
"description": "Fetch polyfilled in Node only", | ||
"main": "node.js", | ||
"browser": "browser.js", | ||
"exports": { | ||
"node": "./node.js", | ||
"default": "./browser.js" | ||
}, | ||
"browser": { | ||
"node-fetch": false, | ||
"abort-controller": false | ||
}, | ||
"repository": { | ||
@@ -25,2 +31,3 @@ "type": "git", | ||
"dependencies": { | ||
"abort-controller": "^3.0.0", | ||
"node-fetch": "^3.3.0" | ||
@@ -27,0 +34,0 @@ }, |
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
Network access
Supply chain riskThis module accesses the network.
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
2251
37
2
2
+ Addedabort-controller@^3.0.0
+ Addedabort-controller@3.0.0(transitive)
+ Addedevent-target-shim@5.0.1(transitive)