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

stuft

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stuft - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

12

lib/index.js

@@ -18,12 +18,12 @@ "use strict";

const { id, limit, section } = options;
const url = new URL(constants_1.BASE);
url.pathname = constants_1.API_PATH;
let url = constants_1.BASE;
url += constants_1.API_PATH[0] === "/" ? constants_1.API_PATH.slice(1) : constants_1.API_PATH;
if (id) {
url.pathname += "/" + id.toString();
url += "/" + id.toString();
}
else if (section) {
url.pathname += "/" + section;
url += "/" + section;
}
if (limit) {
url.searchParams.set("limit", limit.toString());
url += `?limit=${limit}`;
}

@@ -58,3 +58,3 @@ return url;

const url = buildUrl(options);
const res = await cross_fetch_1.default(url.toString(), fetchOptions);
const res = await cross_fetch_1.default(url, fetchOptions);
// check for errors

@@ -61,0 +61,0 @@ if (res.status !== 200) {

{
"name": "stuft",
"version": "1.0.5",
"version": "1.0.6",
"description": "A news api.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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