@js-bits/fetch
Advanced tools
Comparing version 0.2.0 to 1.0.0
@@ -5,4 +5,3 @@ import nodeFetch from 'node-fetch'; | ||
const abortController = typeof AbortController === 'undefined' ? nodeAbortController : AbortController; | ||
export default typeof fetch === 'undefined' ? nodeFetch : fetch; | ||
export { abortController as AbortController }; | ||
const exportFetch = typeof fetch === 'undefined' ? nodeFetch : fetch; | ||
export { abortController as AbortController, exportFetch as fetch }; |
@@ -1,3 +0,3 @@ | ||
import fetch, { AbortController } from './index.js'; | ||
// const { default: fetch, AbortController } = require('./dist/index.cjs'); | ||
import { fetch, AbortController } from './index.js'; | ||
// const { fetch, AbortController } = require('./dist/index.cjs'); | ||
@@ -4,0 +4,0 @@ describe(`fetch`, () => { |
{ | ||
"name": "@js-bits/fetch", | ||
"version": "0.2.0", | ||
"version": "1.0.0", | ||
"description": "Cross-environment (nodejs/web) fetch API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -24,3 +24,3 @@ # Cross-environment (nodejs/web) fetch APi | ||
```javascript | ||
import fetch, { AbortController } from '@js-bits/fetch'; | ||
import { fetch, AbortController } from '@js-bits/fetch'; | ||
``` | ||
@@ -31,3 +31,3 @@ | ||
```javascript | ||
const { default: fetch, AbortController } = require('@js-bits/fetch'); | ||
const { fetch, AbortController } = require('@js-bits/fetch'); | ||
``` | ||
@@ -34,0 +34,0 @@ |
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5022
1