Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libsql/isomorphic-fetch

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libsql/isomorphic-fetch - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

19

node.js

@@ -19,5 +19,20 @@ import http from 'http';

function fetchWithAgentSelection(resource, options = {}) {
return fetch(resource, { agent: agentSelector, ...options });
let url = resource;
let fetchOptions = options;
if (resource.constructor.name === 'Request') {
url = resource.url;
fetchOptions = {
method: resource.method,
headers: resource.headers,
body: resource.body,
...options
};
}
const parsedUrl = new URL(url);
const agent = agentSelector(parsedUrl);
return fetch(url, { agent, ...fetchOptions });
}
export { fetchWithAgentSelection as fetch, _Request as Request, _Headers as Headers};

9

package.json
{
"name": "@libsql/isomorphic-fetch",
"version": "0.2.1",
"version": "0.2.2",
"keywords": [

@@ -47,3 +47,6 @@ "fetch",

"*.d.ts"
]
}
],
"engines": {
"node": ">=18.0.0"
}
}

Sorry, the diff of this file is not supported yet

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