ky-universal
Advanced tools
Comparing version 0.3.0 to 0.4.0
export {default} from 'ky'; | ||
export * from 'ky'; |
export {default} from 'ky'; | ||
export * from 'ky'; |
20
index.js
'use strict'; | ||
const {URL, URLSearchParams} = require('url'); | ||
const fetch = require('node-fetch'); | ||
const AbortController = require('abort-controller'); | ||
if (!global.URL) { | ||
global.URL = URL; | ||
} | ||
if (!global.URLSearchParams) { | ||
global.URLSearchParams = URLSearchParams; | ||
} | ||
if (!global.fetch) { | ||
@@ -34,11 +25,2 @@ global.fetch = fetch; | ||
const { | ||
default: ky, | ||
HTTPError, | ||
TimeoutError | ||
} = require('ky/umd'); | ||
module.exports = ky; | ||
module.exports.default = ky; | ||
module.exports.HTTPError = HTTPError; | ||
module.exports.TimeoutError = TimeoutError; | ||
module.exports = require('ky/umd'); |
{ | ||
"name": "ky-universal", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Use Ky in both Node.js and browsers", | ||
"license": "MIT", | ||
"repository": "sindresorhus/ky-universal", | ||
"funding": "https://github.com/sindresorhus/ky-universal?sponsor=1", | ||
"author": { | ||
@@ -13,3 +14,3 @@ "name": "Sindre Sorhus", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=10" | ||
}, | ||
@@ -60,8 +61,8 @@ "scripts": { | ||
"devDependencies": { | ||
"ava": "^2.2.0", | ||
"ky": "^0.12.0", | ||
"xo": "^0.24.0" | ||
"ava": "^2.4.0", | ||
"ky": "^0.17.0", | ||
"xo": "^0.25.3" | ||
}, | ||
"peerDependencies": { | ||
"ky": ">=0.12.0" | ||
"ky": ">=0.17.0" | ||
}, | ||
@@ -68,0 +69,0 @@ "browser": "browser.js", |
@@ -18,3 +18,2 @@ # ky-universal [![Build Status](https://travis-ci.com/sindresorhus/ky-universal.svg?branch=master)](https://travis-ci.com/sindresorhus/ky-universal) | ||
## Install | ||
@@ -28,3 +27,2 @@ | ||
## Usage | ||
@@ -42,3 +40,2 @@ | ||
## API | ||
@@ -48,3 +45,2 @@ | ||
## FAQ | ||
@@ -84,3 +80,2 @@ | ||
## Related | ||
@@ -87,0 +82,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
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
5090
21
80