Socket
Socket
Sign inDemoInstall

ky-universal

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ky-universal - npm Package Compare versions

Comparing version 0.11.0 to 0.12.0

5

index.js
import fetch, {Headers, Request, Response} from 'node-fetch';
import AbortController from 'abort-controller';

@@ -22,6 +21,2 @@ const TEN_MEGABYTES = 1000 * 1000 * 10;

if (!globalThis.AbortController) {
globalThis.AbortController = AbortController;
}
if (!globalThis.ReadableStream) {

@@ -28,0 +23,0 @@ try {

17

package.json
{
"name": "ky-universal",
"version": "0.11.0",
"version": "0.12.0",
"description": "Use Ky in both Node.js and browsers",

@@ -19,3 +19,3 @@ "license": "MIT",

"engines": {
"node": ">=14.16"
"node": ">=16"
},

@@ -63,13 +63,12 @@ "scripts": {

"dependencies": {
"abort-controller": "^3.0.0",
"node-fetch": "^3.2.10"
"node-fetch": "^3.3.2"
},
"devDependencies": {
"ava": "^4.3.3",
"ky": "^0.31.4",
"tsd": "^0.24.1",
"xo": "^0.52.4"
"ava": "^5.3.1",
"ky": "^0.33.3",
"tsd": "^0.28.1",
"xo": "^0.55.0"
},
"peerDependencies": {
"ky": ">=0.31.4",
"ky": ">=0.33.0",
"web-streams-polyfill": ">=3.2.1"

@@ -76,0 +75,0 @@ },

@@ -5,3 +5,3 @@ # ky-universal

[Ky](https://github.com/sindresorhus/ky) is made for browsers, but this package makes it possible to use it in Node.js too, by polyfilling most of the required browser APIs using [`node-fetch`](https://github.com/bitinn/node-fetch) and [`abort-controller`](https://github.com/mysticatea/abort-controller).
[Ky](https://github.com/sindresorhus/ky) is made for browsers, but this package makes it possible to use it in Node.js too, by polyfilling most of the required browser APIs using [`node-fetch`](https://github.com/bitinn/node-fetch).

@@ -13,8 +13,6 @@ This package can be useful for:

**Note:** Before opening an issue, make sure it's an issue with Ky and not its polyfills. Generally, if something works in the browser, but not in Node.js, it's an issue with `node-fetch` or `abort-controller`.
**Note:** Before opening an issue, make sure it's an issue with Ky and not its polyfills. Generally, if something works in the browser, but not in Node.js, it's an issue with `node-fetch`.
Keep in mind that Ky targets [modern browsers](https://github.com/sindresorhus/ky#browser-support) when used in the browser. For older browsers, you will need to transpile and use a [`fetch` polyfill](https://github.com/github/fetch).
**If you only target Node.js, I would strongly recommend using [Got](https://github.com/sindresorhus/got) instead.**
## Install

@@ -21,0 +19,0 @@

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